Dear all,
Here my Problem is actually i develop one application in windows Forms by using MS Access database.here i kept my database mdb at some specified path and define connection string with respect that.
now i want to do as not specifed the path of database.while instal the application in client machine we didn't place database in client machine at that path we place in our machine.application automatically holds the database and update database after every modification doing in client machine.I hope u understand exactly what need.Waiting for u r valuable suggession.
Thanks in advance.
Regards'
Vishnuvardhan.
Connecting string to MS access Database
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 17, 2011, 8:07 PM EST
Please refer the below link
http://www.connectionstrings.com/access
Add a App.xml file to the project as
Call the connection to any form as
string ConnectionString = System.Configuration.ConfigurationSettings.AppSettings["dsn"];
And finally store the EMP.mdb in bin folder.
Thanks
Mamta MRank #268 · 9.4K reputationPosted Nov 17, 2011, 8:13 PM EST
You need to make use of application configuration for this. That way you can store your connection strings in a relative path instead of absolute path.
Check below links, they will help you:
http://www.codeguru.com/columns/DotNet/article.php/c7987/ (Scroll down in the link till you come to appSettings)
http://msdn.microsoft.com/en-us/library/ms254494(v=vs.80).aspx