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.
Loading
Mamta MPosted Nov 18, 2011, 1:13 AM
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
Satyapriya NayakPosted Nov 18, 2011, 1:07 AM
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