Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Distributed Database Program

Distributed Database Program

Distributed Database Program

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.



RE: Distributed Database Program

Store your database in the same directory as the application, then use App.Path to point to it.

App.Path always refers to the directory that the application is running from.

Good Luck
To get the best from these forums read FAQ731-376 before posting

RE: Distributed Database Program

Thank you johnwm, but that part i'm ok with. I can track down the correct path (using app.path) and change the connection string of the database.

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


P.S "On Error GoTo Next" doesn't work as it appears the error is being generated "outside" of my program.


RE: Distributed Database Program

This is one of the problems with using bound controls and the ADODC control - not much control!

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
To get the best from these forums read FAQ731-376 before posting

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close