how to let the database position change whith the main installation directory?

hanon13
08-05-2002, 07:48 PM
I developed a program and i use p&d to create a install package.
but once i install the program in the non-default position. it always notice me that it can't find the database file,when the program run.

Are there some method can dymanically pointing the database file position at the installation time.

Thank you
:)

Thinker
08-05-2002, 08:00 PM
No, you need to allow for that in the running code. If you hard
code the path in your connectionstring, you need to make sure
the database is always in that path. Otherwise, have a setup
option that the user can run to define the path to the database
file. Save the path in the registry using savesetting and retrieve
it with getsetting. Build the connectionstring in code to open the
database.

Laurent
08-07-2002, 01:24 PM
I did like Thinker suggested and it works fine specially when the application could be ran in a client server environment. you can let the users define where to put the database and ask on the first launch where the database is installed.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum