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

Mittal Joshi34 reputationPosted Sep 14, 2009, 2:27 AM EDT
OleDbConnection cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|database.mdb;Persist Security Info=True");
Resmy Ravi74 reputationPosted Sep 14, 2009, 2:42 AM EDT
"could not find file" occcured.
in vb6 we can give "app.path\database.mdb" no. what is the c# equivalent of this?
Roei BarRank #1,271 · 1.4K reputationPosted Sep 14, 2009, 3:32 AM EDT
have a look @ this site, gr8 referance for connection strings howto:
http://connectionstrings.com/
venkat mohan19 reputationPosted Sep 14, 2009, 9:38 AM EDT