Chris you are correct.. I hope I did not confuse the issue.. I was just wondering if the application was local or if the DB sat on a remote server in a client server environment.. if so .. then one can not assume that the Database is in a set location.. not even where the .exe resides.. but most people do either or..
your explanation is correct.. it's up to the original poster to test out the example and replace his code with the ExtractFilePath code example thanks --- On Fri, 5/2/08, Chris <[EMAIL PROTECTED]> wrote: > From: Chris <[EMAIL PROTECTED]> > Subject: RE: [delphi-en] Re: Deployment of a Access DB based application > using installshield express > To: [email protected] > Date: Friday, May 2, 2008, 12:45 AM > Maybe I don't understand the question. > > > > If the database will always be at the same relative path to > the exe then > using > extractfilepath(paramstr(0))+'data\mydatabase.mdb' > should work eg > > > > If the exe is in \\server1\apps\myapp.exe > <file:///\\server1\apps\myapp.exe> > > > database will work if its > \\server1\apps\data\mydatabase.mdb > <file:///\\server1\apps\data\mydatabase.mdb> > > > > > if exe is in c:\myprograms\thegoodone\myapp.exe > > database will work if its > c:\myprograms\thegoodone\data\mydatabase.mdb > > > > I have just tested it and it works. > > > > Or do you mean that each user has a local database on their > computer, and > the exe is stored in the server? The registry would be a > good option; or an > INI in the server that uses the computer name as a prefix > to store the > database path. > > > > Maybe I'm just not understanding the question :-) > > > > > > PO Box 627 00502 Karen, > Nairobi, Kenya. > Mobile: +254 722 996532 > Fixed: +254 20 2050859 > [EMAIL PROTECTED] > > _____ > > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf > Of Marselle > Sent: 01 May 2008 10:57 p > To: [email protected] > Subject: RE: [delphi-en] Re: Deployment of a Access DB > based application > using installshield express > > > > yes assuming he is running it on the local hard drive > Chris.. but if he runs > it on a client server environment should return the same > results by > extractfilePathf(param(0)) + DBName > > hard to determine with the information he has provided in > my opinion > > --- On Thu, 5/1/08, Chris <[EMAIL PROTECTED] > <mailto:jangita%40jangita.com> > com> wrote: > > > From: Chris <[EMAIL PROTECTED] > <mailto:jangita%40jangita.com> com> > > Subject: RE: [delphi-en] Re: Deployment of a Access DB > based application > using installshield express > > To: [EMAIL PROTECTED] > <mailto:delphi-en%40yahoogroups.com> ps.com > > Date: Thursday, May 1, 2008, 1:35 PM > > ADOConnection1.ConnectionString := > > > cs+extractfilepath(paramstr(0))+'Data\MyDataBase.mdb' > > ??? > > > > > > > > Will always get the database if its in a subfolder > > \data\ from the > > executable > > > > > > > > PO Box 627 00502 Karen, > > Nairobi, Kenya. > > Mobile: +254 722 996532 > > Fixed: +254 20 2050859 > > [EMAIL PROTECTED] <mailto:jangita%40jangita.com> > com > > > > _____ > > > > From: [EMAIL PROTECTED] > <mailto:delphi-en%40yahoogroups.com> ps.com > > [mailto:[EMAIL PROTECTED] > <mailto:delphi-en%40yahoogroups.com> ps.com] > On Behalf > > Of Anu Rang > > Sent: 01 May 2008 6:17 p > > To: [EMAIL PROTECTED] > <mailto:delphi-en%40yahoogroups.com> ps.com > > Subject: [delphi-en] Re: Deployment of a Access DB > based > > application using > > installshield express > > > > > > > > If I put in a relative path in the ConnectionString > the > > application > > fails to build. It comes up with Unable to locate > database > > file or > > something to that effect. I think may be some kind of > > registry key > > with the path entered at the installation time may > have to > > be used. I > > just dont know how to do this. Hope I find something > on the > > internet. > > > > Anu Rang, TotallyFreeEnergy > > http://totallyfreee > > <http://totallyfreee > <http://totallyfreeenergy.freehoxt.com> > nergy.freehoxt.com> > > nergy.freehoxt.com > > > > --- In [EMAIL PROTECTED] > > <mailto:delphi-en%40yahoogroups.com> ps.com, > > Zoran Milenkovic <[EMAIL PROTECTED]> > > wrote: > > > > > > If the data is located in the same directory as > your > > EXE file, then > > you can remove the path from connection string leaving > only > > the > > database name. In that case the application will look > for > > your > > database in the current directory. > > > > > > If you need to have data in separate directory, > it > > should still be > > easy to manipulate the connection string, provided > that > > these two > > directories are related. > > > > > > For instance: > > > > > > const > > > cs: String = > > > 'Provider=Microsoft.Jet.OLEDB.4.0;'+ > > > 'Jet OLEDB:Engine Type=5;'+ > > > 'Data Source='; > > > > > > implementation > > > > > > ADOConnection1.ConnectionString := > > cs+'..\Data\MyDataBase.mdb'; > > > > > > > > > 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://totallyfreee > > <http://totallyfreee > <http://totallyfreeenergy.freehoxt.com> > nergy.freehoxt.com> > > nergy.freehoxt.com > > > > > > > > > > > > > > > > > > > > > --------------------------------- > > > Be a better friend, newshound, and know-it-all > with > > Yahoo! Mobile. > > Try it now. > > > > > > [Non-text portions of this message have been > removed] > > > > > > > > > > > > > > > [Non-text portions of this message have been removed] > > > > > > ------------------------------------ > > > > ----------------------------------------------------- > > Home page: http://groups. > <http://groups.yahoo.com/group/delphi-en/> > yahoo.com/group/delphi-en/ > > To unsubscribe: delphi-en-unsubscri > <mailto:delphi-en-unsubscribe%40yahoogroups.comYahoo> > [EMAIL PROTECTED] > > Groups Links > > > > > > > > __________________________________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. http://mobile. > <http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ> > yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > > > > [Non-text portions of this message have been removed] > > > ------------------------------------ > > ----------------------------------------------------- > Home page: http://groups.yahoo.com/group/delphi-en/ > To unsubscribe: [EMAIL PROTECTED] > Groups Links > > > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

