--- In [email protected], "Anu Rang" <[EMAIL PROTECTED]> wrote: > > Hi, > Having built my application using a local Access database, I was trying > to deploy my application using Installshield express. The thing about > deployment on target computer is that normally where the application is > installed is decided by the user. Ofcourse it is possible to enforce a > particular directory path for installation. Still it is tricky to get a > relative path mapped in the ADOConnection object. I just used use > connection string and built it using the ADOConnection wizard. If > anyone has more info or knowledge I would really appreciate it since > this path to the .mdb file really has to be relative and not hard coded. > > Anu Rang, TotallyFreeEnergy > http://totallyfreeenergy.freehoxt.com >
I you have a database connection named adoConnection, you can easily set its ConnectionString property adoConnection.ConnectionString := '...'). You can however also set parts of the connection string by Properties property. You can do the following: adoConnection.Properties['Data Source'].Value := 'c:\db\database.mdb'; or (to use the database from the same directory as your application) adoConnection.Properties['Data Source'].Value := ExtractFilePath (ParamStr (0)) + 'database.mdb'; With this approach, you can set the actual database at runtime. Make sure your database connection is closed before changing these parameters! kind regards, Ronny Aerts Belgium

