Distributed Database Program
Distributed Database Program
(OP)
Hello All,
I am creating a catalogue in VB6. All of the data is stored in an Access database which is linked to some data bound controls through an ADODC Control.
The Program works "Perfectly" except for one thing. This program will be used on multiple computers therefore the Path of the database will be different on different computers (ie. some CD-ROM drives are D: some are E: and if its put onto the harddrive then it could be anything!)
I can change the ConnectionString of the ADODC Control to find the new path once the program starts, but while the program is loading i receive error messages for each ADODC Control stating that the database can't be found
I need to bypass this error message so my program can update the database path without the user having to press "OK" 40 times.
Any help would be appreciated.
Cheers,
HOJO
I am creating a catalogue in VB6. All of the data is stored in an Access database which is linked to some data bound controls through an ADODC Control.
The Program works "Perfectly" except for one thing. This program will be used on multiple computers therefore the Path of the database will be different on different computers (ie. some CD-ROM drives are D: some are E: and if its put onto the harddrive then it could be anything!)
I can change the ConnectionString of the ADODC Control to find the new path once the program starts, but while the program is loading i receive error messages for each ADODC Control stating that the database can't be found
I need to bypass this error message so my program can update the database path without the user having to press "OK" 40 times.
Any help would be appreciated.
Cheers,
HOJO





RE: Distributed Database Program
App.Path always refers to the directory that the application is running from.
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
RE: Distributed Database Program
The problem i'm having is that i can only do this once the program is running, but the error message for not finding the database comes up when LOADING the program.
If i can stop this error message coming up then the database can find its path without the user knowing there was a problem.
Thanks again
HOJO
P.S "On Error GoTo Next" doesn't work as it appears the error is being generated "outside" of my program.
Cheers!!!
RE: Distributed Database Program
Try setting up an ADODB connection object for your connection and an ADODB recordset for your Datasource. There are examples of both in Help
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting