
October 13th, 2004, 03:47 AM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
You can change the database connection to another SQL server database by changing the connection string for the 'current project'. Look for the exact syntax on msdn.
following link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdprostatex.asp See the string 'strCnxn' for the correct syntax.
Quote: | Originally Posted by benns Hi,
i have 2 MSSQL DBs.
im using DSN name to connect MSSQL DB to generate the report. for example, i have designed a report CR1 from the DB using dsn, named DSN1 which refers
the DB named Master1.
but now i want to connect the same report CR1 in a another dsn name called as
DSN2 which refers MSSQL DB named as Master2.
(because the both DB's have the same table, but i want the report to print from another DB's table. )
but at runtime if i do the coding from vb application like,
crystalreport1.connect = "DSN=DSN1"
(this coding works if the dsn name as DSN1)
its giving error msg like "error detected by database dll".
How could i make the data connectivity at runtime to point the different dsn name ie, DSN2. (consider i design the report manually at design mode of CR and connect the DB thru DSN ie, DSN1 refers Master1 DB and call it in vb application at runtime.) |
|