Results 1 to 4 of 4

Thread: when a database moves...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Dublin, IRE
    Posts
    111

    Question

    I'm having some trouble deciding how to handle what happens when the database I've 'hardcoded' into the properties of a data control is moved.

    I code at home, and stick the database into the current working directory, but obviously the full path is saved (so, d:\projects\current\data1.mdb).

    Now, when I bring the app to the office or the client, I can't expect that they'll have a d: to use, never mind that I'd have to create a brand new directory structure just for my own use.

    Also, most clients have networks, and want the database to be shared.

    So how do people on this list set it up so that they only need to enter the database path once and the system works from thereon out. (I solved it originally by asking for the path at login and saving it to the registry, but there's not always a login screen).

  2. #2
    Guest
    Either use the registry or create a DSN.

    best regards

    Sascha

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    If possible, I keep the EXE and the DB in the same directory, therefore I always can use App.Path & "\filename.mdb". Running the EXE off the network drive is usually not a big problem

    Otherwise, create a DSN as Sascha mentioned

  4. #4

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Dublin, IRE
    Posts
    111

    Angry

    Am I correct is saying that if I create a DSN for my own use, I have to make sure that gets onto everybody's machine at setup? I've seen nothing in the VB5 Application Setup Wizard that would do this for me (although I can't say I've used DSNs extensively), so is it the case that I'd have to manually add it myself.

    It might be easier just to create a .reg file and get the user to click on it...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width