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="|DataDirectory|\Inventory Management database.mdb""
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