ODBC Connect Str
Posted on 2002-03-07
I am running an Access to SQL server application.
When setting up the Connect String for pass through queries I am pointing it to the live DB called AdaptData ie;ODBC;DRIVER=SQL Server;SERVER=DIMENSIONS;UID=scott;PWD=password;DATABASE=AdaptData
I also have a test DB set up called BackUp
Due to me having to change the connect string between Databases so I can test code I am currently having to change the Connect String on Each Pass Through, and there are a few!!
Is there a way I can place a variable in this connect string and change it through code..
ie; ODBC;DRIVER=SQL Server;SERVER=DIMENSIONS;UID=scott;PWD=password;DATABASE=[Variable]