mlcktmguy
asked on
changing data environment datalink properties in code
I am developing a VB6.0 app linked to an MS Jet/Access database on my machine. Oviously the app will be distributed to my clients upon completion. In the data enviroment, on the 'connection' tab of the datalink properties I enter the path where the MDB is located on my development machine, 'C:\TestApp\Client.MDB'. This works great for testing but when I let the client install the app they do not have to use the same directory strcuture or even drive letters that I use in testing.
When the app is distributed how do I alter the 'connection' tab property to point to the production MDB. The MDB may be in another directory that the one I tested with and will most likely be on a network drive rather than C:.
I am making some adhoc connections to the database using the following:
dbName = "NEIntAndWeb.mdb"
Open_Ini 'loads 'networkPath' based on values in the .ini
strConnect = "Provider=Microsoft.Jet.OL EDB.4.0;Da ta Source=" & NetworkPath & dbName
can I overlay the Data Environment connection with 'strConnect'
When the app is distributed how do I alter the 'connection' tab property to point to the production MDB. The MDB may be in another directory that the one I tested with and will most likely be on a network drive rather than C:.
I am making some adhoc connections to the database using the following:
dbName = "NEIntAndWeb.mdb"
Open_Ini 'loads 'networkPath' based on values in the .ini
strConnect = "Provider=Microsoft.Jet.OL
can I overlay the Data Environment connection with 'strConnect'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Got it:
DataEnvironment1.Connectio n1.Connect ionString = strConnect
DataEnvironment1.Connectio
ASKER