So i made this awesome media player in delphi , spent allot of hard work on it. But the problem is, After connecting the Database made in Office to the project, (The music's name and filepath ect. is stored here) And copying the files over to another computer, The program looks for the database in MY computers directory instead of attaching the database to the program.
If im still unclear as to what the problem is, someone please reply and ill try to be a bit more specific.
O....and help me please
Database in Delphi help please
- rustypup
- Registered User
- Posts: 8872
- Joined: 13 Dec 2004, 02:00
- Location: nullus pixius demonica
- Contact:
ok. i have zero exp. in delphi, (that's a good thing), but:
1) when you say "created in office", can we assume you're referring to access?
2) if you do mean access, the next assumption is that you're using ADO for the connection and not BDE. are you specifying an absolute path to the database, or are you using an ODBC alias?
the database should be installed relative to your execution directory. because you're using a static string argument to connect, placing your app anywhere outside of the specifed directory structure will present you with this issue.
the options are:
1) use a relative path to access the database in the execution directory tree, ("./data/myDataStore.mdb").
2) use the ODBC tool to create a system alias for your database on the host machine. Regardless of where you install the app, the system will be able to resolve this alias to the correct database.
3) always install in the same directory tree on every host.
4) insert a path alias in the system PATH variable. this will require some effort upfront with the installer and is probably the most brittle. (actually, this one's a horrifically bad idea... )
1) when you say "created in office", can we assume you're referring to access?
2) if you do mean access, the next assumption is that you're using ADO for the connection and not BDE. are you specifying an absolute path to the database, or are you using an ODBC alias?
the database should be installed relative to your execution directory. because you're using a static string argument to connect, placing your app anywhere outside of the specifed directory structure will present you with this issue.
the options are:
1) use a relative path to access the database in the execution directory tree, ("./data/myDataStore.mdb").
2) use the ODBC tool to create a system alias for your database on the host machine. Regardless of where you install the app, the system will be able to resolve this alias to the correct database.
3) always install in the same directory tree on every host.
4) insert a path alias in the system PATH variable. this will require some effort upfront with the installer and is probably the most brittle. (actually, this one's a horrifically bad idea... )
Most people would sooner die than think; in fact, they do so - Bertrand Russel