Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection string error: Un-recognized escape sequence ...

Status
Not open for further replies.

rahmanjan

Programmer
Apr 13, 2003
180
AU
Hi all,

I am trying to connect to a MS-access 2000 database. I have come from VB background. I used OLEdbConnection control and created the following connection string but C# raises the error "Un-recognized escape sequence".
What can go wrong here?

"cnnStr="Provider=Microsoft.Jet.OLEDB.4.0;Password=;User ID=Admin;Data Source=D:\Inetpub\ Deny None;Extended Properties=;Jet OLEDB:System database=;Jet OLEDB:Registry Path=;Jet OLEDB:Database Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False";"

Do i really need all of this craps anyways?

any comment will be highly appreciated,

raman
 
yamjan
Your connection string does not have to be that long. The escape sequence problem is because your backslashes should be forward slashes-cnnStr="Provider=Microsoft.Jet.OLEDB.4.0;Password=;User ID=Admin;Data Source=D:/Inetpub/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top