cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically refreshing a trusted sql server connection on SQL Server 2012

former_member468298
Participant
0 Kudos

I have a c# program that will correctly replace a trusted database connection the first time a report runs. When I select another database, and run the same code to replace the connection with the new database name, the database connection does not get updated with the latest database name. When the report completes, it still uses the first selected database connection. Thank you

former_member468298
Participant
0 Kudos

Hi Cherry, I am not sure what you mean by clearing the cache before hand, but my program is not a Web application, it is a windows desktop application. Each database connection is stored in row of a database. The row being retrieved is a function of what platform the report was originally designed on. I have my own parameter input screen that includes a database selection choice which I build on the fly. I am trying assign the last selected database connection dynamically to the report along with the last entered report parameters before assigning the report document to the crystal report component.

Any further ideas since I provided more requirement to my project?

Thank you

Accepted Solutions (0)

Answers (1)

Answers (1)

cherry_tian
Employee
Employee
0 Kudos

Hi, Ben

Have you changed the connection string to the remote database in the C# program?

If the connection string is changed accordingly, please try to clear the cache before you run the report.

Best regards,

Cherry.