| View previous topic :: View next topic |
| Author |
Message |
Mitesh2004 Freshman
Joined: 26 Jan 2004 Posts: 43
|
Posted: Feb 18th, 2004 05:53 AM Post subject: Connecting to database using App.path |
|
|
Hi,
I am connecting to a database using the ADO controller. At the moment, the Connection String property is a specified path. This means that this path needs to be changed everytime my system is installed on a new computer.
Can i somehow use App.path here somehow instead of specifying the whole path?
I would be very grateful for any help! Cheers!! |
|
| Back to top |
|
Andir Centurion

Joined: 21 Dec 2003 Posts: 184 Location: Chicago Area
|
Posted: Feb 19th, 2004 12:51 AM Post subject: |
|
|
Yeah...when you build your connection string use ...
"dbq=" & app.path & "\Database.mdb"
Is this what your looking for? Every time the program runs it will attempt to connect to the <path>\database.mdb file
Basically, strip the connection string down to the point where you just replace the set path with:
[vb:1:217b62c60b]
" & app.path & "\
[/vb:1:217b62c60b] _________________ If you happen to see little people sitting on your desk...don't tell anyone or they might think your crazy too. |
|
| Back to top |
|
|