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

Selecting Database Path

P: n/a
Hi all,
I have an inventory application I'm writing for the company I work for
and realized the path for the Access database might reside on a network
drive. I have used Microsoft's Add Data Source method of adding the db to
the app. How could I customize this so the path can be changed. I found
that the connection is a ReadOnly property and cannot be changed.

Thanks,

Tony K

Jul 24 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I'm assuming that you're using VB.NET for your application.

When you run the add data source wizard in VS2005, it will create an
application variable called "ConnectionString" in your applications's config
file ("MyInventoryApp.exe.config", for example). That can be changed by any
text editor.

Were you wanting the user to be able to change it via the user interface?

"Tony K" <no************@kingprogramming.comwrote in message
news:uu*************@TK2MSFTNGP06.phx.gbl...
Hi all,
I have an inventory application I'm writing for the company I work for
and realized the path for the Access database might reside on a network
drive. I have used Microsoft's Add Data Source method of adding the db to
the app. How could I customize this so the path can be changed. I found
that the connection is a ReadOnly property and cannot be changed.

Thanks,

Tony K

Jul 24 '07 #2

P: n/a
Yes, I was hoping to be able to program say a "Tools" form and allow the
user to select where the database resides then write that info to a config
file or store that path in the registry or something like that.

Tony K
"Chris" <ch*********@sbcgloal.netwrote in message
news:SM*******************@newssvr23.news.prodigy. net...
I'm assuming that you're using VB.NET for your application.

When you run the add data source wizard in VS2005, it will create an
application variable called "ConnectionString" in your applications's
config file ("MyInventoryApp.exe.config", for example). That can be
changed by any text editor.

Were you wanting the user to be able to change it via the user interface?

"Tony K" <no************@kingprogramming.comwrote in message
news:uu*************@TK2MSFTNGP06.phx.gbl...
>Hi all,
I have an inventory application I'm writing for the company I work for
and realized the path for the Access database might reside on a network
drive. I have used Microsoft's Add Data Source method of adding the db
to the app. How could I customize this so the path can be changed. I
found that the connection is a ReadOnly property and cannot be changed.

Thanks,

Tony K

Jul 24 '07 #3

P: n/a
Chris,
How would I access the config file? The filename is
Inventory.exe.config and the info that I would need to access is:

<connectionStrings>
<add
name="Daily_Foods_Inventory.My.MySettings.Inventor y_management_databaseConnectionString"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0 ;Data
Source=&quot;|DataDirectory|\Inventory management database.mdb&quot;"
providerName="System.Data.OleDb" />
</connectionStrings>

Tony K
"Chris" <ch*********@sbcgloal.netwrote in message
news:SM*******************@newssvr23.news.prodigy. net...
I'm assuming that you're using VB.NET for your application.

When you run the add data source wizard in VS2005, it will create an
application variable called "ConnectionString" in your applications's
config file ("MyInventoryApp.exe.config", for example). That can be
changed by any text editor.

Were you wanting the user to be able to change it via the user interface?

"Tony K" <no************@kingprogramming.comwrote in message
news:uu*************@TK2MSFTNGP06.phx.gbl...
>Hi all,
I have an inventory application I'm writing for the company I work for
and realized the path for the Access database might reside on a network
drive. I have used Microsoft's Add Data Source method of adding the db
to the app. How could I customize this so the path can be changed. I
found that the connection is a ReadOnly property and cannot be changed.

Thanks,

Tony K

Jul 24 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.