Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change DSN Database at Runtime

Status
Not open for further replies.

Hexonx

Programmer
Jan 10, 2001
102
US
There have been other questions surrounding this issue, but I want to throw mine in for clarity.

When using .SetLogonInfo method, the Database parameter appears to be ignored. My environment has two databases: Test and Prod, both on the same MS SQL Server 7.0 server, MSSQL11. I wrote the reports against Test and need them to run against Prod. My app uses the same DSN name for both environments, but passes "Test" and "Prod" into the Database parameter, depending on the environment. The only way I can get the reports to actually look at one database or the other is to change the Default Database option in the DSN Configuration screen. Furthermore, if I set the default database to something else, such as 'master', the report can't even find the stored procedures. It looks like I'll have to create two DSNs and have that be the difference between environments.

Any input here?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top