469,645 Members | 1,569 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

Customize Database Path

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:

<connectionStrings>
<add
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" />
</connectionStrings>
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
0 805

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Chris Kilmer | last post: by
3 posts views Thread by gruber | last post: by
1 post views Thread by Gianmaria | last post: by
1 post views Thread by Rachel | last post: by
Iman100
reply views Thread by Iman100 | last post: by
13 posts views Thread by Prisoner at War | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.