Reputation: 11295
I'm debugging ASP application from usb flash (there is located project and I use MS Visual studio) I don't know how to indicate path to db file i try string db_adres = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=J:\test.mdb";
but this is wrong path
Upvotes: 0
Views: 187
Reputation: 216363
In C# you should prefix this kind of string with the char @
string db_adres = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source='J:\test.mdb'";
or double the \
character
string db_adres = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='J:\\test.mdb'";
The first one is called 'verbatim string', the second one is an 'escaped string'
Look here at C# specifications 2.4.4.5 "String Literals"
Upvotes: 2