Hi,
Building an application and started using code to setup the connection and
with code add the remote view tables.
Example of connection code:
* --- DATACONN.PRG - To programically connect to a backend database
* --- Peter Sass, 2003.03.06
* --- Have to open the database first
CLOSE DATABASES ALL
OPEN DATABASE SCALES SHARED
* --- Now Create the connection
CREATE CONNECTION Chipconn DATASOURCE "Chip_Scale" USERID "Admin" PASSWORD "thepassword"
* --- Set the ODBC Login prompt to never prompt you
DBSetProp('chipconn','Connection','DispLogin', 3)
What I want to do is use a connection string in code and the connection string for
this actual connection is :
DSN=Chip_Scale;DBQ=D:\Scales\Chip_db.mdb;Driveld=281;FIL=MS Access;Max Buffer Size=2048;
Page Timeout=5;PWD=thepassword;uid=admin;
What I am trying to do is use the string to connect so I can somehow get into the
"DBQ=D:\Scales\Chip_db.mdb" portion of the string and treat this part as a memory
variable that I can change. So if the Access database location moves to a different
location on the server, a global setup module change change a memory variable
holding the DBQ path will wash into the connection string and change it there.
Any ideas out there ??????? or examples of connection string code using a
memory variable within the string that can be changed ???????
Pete from the Great White North. (Only in Canada, ay.) Over and Out ...