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!

distribute with database

Status
Not open for further replies.

buddyel

MIS
Mar 3, 2002
279
US

I am working on an app that uses an Access database to store data created by the program. How do I distribute this database with the application so that it resides in the installed application folder and will I need to change the coding of my program to specify another location and if so, how?
 
Hello buddyel,
It is very easy using the .net framework to distribute your application along with the database (I am not quite sure about copyright information).
You create a zip file containing your application along with all the other required files (remade, help, etc) AND your database. Make sure that the directory path is stored in the zip file

Wherever in your code you are using a file DON'T use absolute paths (e.g. c:\development\myprojects\project1\Database) but instead use Aplication.ExecutablePath() and then add the database path (e.g. Dim MyPath as String=Aplication.ExecutablePath() + "\Database").

Doing so will allow your application to run from any path (because the "installation path" is retrieved from the system)without need to change the code or force the users to install it into a specific path.

Hope that helps,
Camel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top