-
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).
-
Either use the registry or create a DSN.
best regards
Sascha
-
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
-
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...