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!

Package and Deployment Wizard Woes

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Please Help Me,

I have written a program that uses Access Database files. The Location of these files is hard coded in my program. How can I program the location of these files so that when I create a setup for my program, my program knows where to access them from. (where the user decides to install). Any help would be very appreciated
 
This is not going to be possible with vb's p&d wizzard. Try using installshield. It gives you more control and the learning curve is minimal with VB projects. If thats not an option then you can look for a INI file in the forms onload event. If the ini files is not there then you will know this is the first time the user has used your programm and you can let them search or tell you where the database is. Once you have the location you can write it to the ini file.

Hope this helps.
 
For: JonathanDP (Visitor)

>Put your database in a sub directory called "database".
>Change the source path of your database to "./database" instead of the full path shown.
>Then modify your SETUP.LST file and change the line for your database from "$(AppPath)" to "$(AppPath)\database".
>Then the database will be in the right place no matter where it is installed.

:)
 
If the prophet doesn't do to the mountain, you have to bring the mountain to the prophet!

I had the same problem, and when I tried the hint of ColzZ I couldn't change the source path. So I put the hole thing in a directory in C:\Program files and ajusted all the pathes. Then made the setup-package with the P&D-Wizard and finally copied it to a CD-Rom. And that's it, it works fine, don't even need to put the database in a special directory.
 
Are you using the properties of the dbcons to setup your connection string or are you setting your connection strings up in the form load code of the forms??
You can make an application completely portable if you set the connection strings up in the form load on the forms and can bypass all of the above.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top