Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Connection 1

Status
Not open for further replies.

Davie

Programmer
Aug 4, 1999
3
GB
Help...........<br>
<br>
When I distribute my app to another machine, the executable cannot find the .mdb which stores the data. This .mdb is in the same folder as the .Exe.<br>
Can any one help me with the necessary code to make the .Exe find the database in the distributed folder.<br>
<br>
<br>
Thanks in advance<br>
<br>
Dave...
 
how are you referencing to your data base?<br>
It may be looking for the database at the same place it was when you compiled your project<br>

 
you absolutely need to use app.path or use an external storage place (registry or .ini) to tell the app where the file is. To avoid all that nonsense simple indicate the entire path in code and do not give your users a choice as to where they want to install the app. To do that you need to edit the setup.vbp and re-compile it. All that is necessary is to make the command button on the form enabled = false. This way during install when the user tries to change the path...the button is useless.<br>
<br>
.opendatabase( app.path & "\your.mdb") <br>
<br>
or<br>
<br>
.opendatabase ( c:\your dir\your.mdb")<br>
<br>
yours to decide<br>
<br>
adios
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top