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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.Connect with DSQ= not changing database.

Status
Not open for further replies.

Kutulu

Programmer
Feb 20, 2002
1
US
Using: CR 8.5, SQL 2000.

We are trying to create a reporting tool that will be used against multiple different databases with the same schema. In the application, we allow the user to select a database by name, then set the .Connect property of the OCX control:

CR.Connect = "DSN=Production;UID= " & sUser & ";PWD=" & sPwd & ";DSQ=" & sSelectedDB

If we change the username or password, this has the desired effect. However, if the user selected a database different from the default for the DSN, Crystal ignores it and uses the default database.

We have removed the database name from all locations in the reports. If we change the DNS to point to a new database, Crystal picks the change up fine. If we don't specify a database in the DSN, Crystal picks up the default database for the user.

Any idea what I'm doing wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top