i have placed my database(in access) in my project folder.then how to give its path in connection string.
when i give its path.An exception "F\RDAGENT\RDAGENT\bin\debug\data.mbd is not a valid path" accures.but when i put tha database in bin\debug it works.
but i need to change tha database location.how to solve this problem.
PLZ HELP ME........
Loading
venkat mohanPosted Sep 14, 2009, 1:38 PM
Roei BarPosted Sep 14, 2009, 7:32 AM
have a look @ this site, gr8 referance for connection strings howto:
http://connectionstrings.com/
Resmy RaviPosted Sep 14, 2009, 6:42 AM
"could not find file" occcured.
in vb6 we can give "app.path\database.mdb" no. what is the c# equivalent of this?
Mittal JoshiPosted Sep 14, 2009, 6:27 AM
OleDbConnection cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|database.mdb;Persist Security Info=True");