By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,733 Members | 1,137 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,733 IT Pros & Developers. It's quick & easy.

Customize Database Path

P: n/a
My inventory app has an Access database that will need to reside on a
Mapped Network Drive. It is unknown where the path will be until the
application is installed. I was thinking I could make a Tools form to allow
the user to select where the DB resides then I wouldn't have to recompile
the program if the DB ever moves to a different location.
I am using VB.NET 2005. I used the Add Data Source Wizard which created
my ConnectionString with Application scope. Because it is a ReadOnly
Property I cannot modify the connection string by using a Set.

In my bin directory, I have a file named Inventory.exe.config that
contains the following:

name="Inventory.My.MySettings.Inventory_management _databaseConnectionString"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0 ;Data
Source=&quot;|DataDirectory|\Inventory Management database.mdb&quot;"
providerName="System.Data.OleDb" />
These files in my project contain the connection string with the path.
app.config Resources.resx Settings.Designer.vb

How do I allow the user to set the path and save the path at Runtime?

Thank you in advance,
Tony K

Jul 26 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.