Where to place database file?

mmb

Active member
Joined
Aug 1, 2004
Messages
42
Programming Experience
1-3
I have made database on MS Access.
Now I am making Setup of my project.
Pls let me know where should I place my MS Access file.
I have also used an ActiveX Button as .OCX file, where should I place this too.

I know that we have to give ..appPath..something path to the database file inorder to fetch the file in the location of the project.

I dont know this very well. I am making mistakes.
PLS guide me . It really imp..as I am completed the project and stuck on this.
 
Well, it is depends how your application is connected to the database. If it is connected through "Server Explorer" and your database file is in the "bin" folder, then the database file should be in the "Target machine’s Application Folder" in your Setup project. If the database is connected through the code than you will need a path same as it would be in the "target machine's application folder" directory. It also can be in sub folder such as

"C:\ Program Files\Home\database\your file.mdb"
 
databaseconnection.connectionstring= application.startuppath & "\mydatabase.mdb" there's more to the connection string but i cant remember right off hand i think the website ta find the rest out is www.connectionstrings.com or something
 
Back
Top