cancel
Showing results for 
Search instead for 
Did you mean: 

NET-CS2005_CRNET_Modify_Database-ConnectionInfo

0 Kudos

We are moving from Oracle to SQL DB and we are updating the Crystal report data source (connection info) from Oracle to Sql.

Here we are trying to automate the data source change through .Net and we are referring the NET-CS2005_CRNET_Modify_Database-ConnectionInfo project to automate the change, but ApplyLogOnInfo method is not working and it is reverting the changes.

Can you suggest what we are missing here or suggest an alternate?

0 Kudos

It would be appreciated if we can get some type of response as we have exhausted all the research and running into dead end.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

When replacing the DB connection or going from one DB to another you need to use ReplaceConnection() API. Try searching for the API using Google and you'll find how to's.

Or use Ido's suggestion

Answers (2)

Answers (2)

ido_millet
Active Contributor
0 Kudos

If the DIY approach doesn't pan out, there are existing tools that allow you to do mass update of data sources.
Here's a candidate list: https://kenhamady.com/productlinks/default.html#doc

DellSC
Active Contributor
0 Kudos

Which version of VS are you using? What version of SQL Server? Is there a specific error that you're getting when you run your app?

With an Oracle connection, in addition to setting the driver for the connection, you set the database, user name and password. With SQL server, you set the driver, server, database, user name, and password. In addition, you need to have the correct version of the SQL Server Native Client installed for this to work.

-Dell

0 Kudos

Hello Dell, thanks for responding so quickly. Here is the following software we are currently using ;

  1. Crystal Reports for Visual Studio 2010
  2. Visual Studio 2015
  3. SQL Server Native Client 11.0

The error that we are getting is that we are not able to convert Oracle ODBC connection to the new SQL Server ODBC - The credentials and the names of the database change however it still try's to connect to Oracle again.

DellSC
Active Contributor
0 Kudos

Can you provide the code you're using to change the database?

I finally tracked down the code I had used for this, but it's specific to working with Crystal reports in BusinessObjects - it won't work for just updating reports outside of BOBJ. I'll see what else I might track down.

-Dell

0 Kudos

Thanks Dell, I will get that to you by tomorrow. I'll have the team post it here.

0 Kudos

Hello Dell, see attached. program.txt