CS1009: Unrecognized escape sequence

escape those \ in lines like the following

ad.DataFile = "D:\Hosting\9372580\html\pearl\Pearl.mdb";

you can either manually escape them all like so

ad.DataFile = "D:\\Hosting\\9372580\\html\\pearl\\Pearl.mdb";

or you can make it a literal string

ad.DataFile = @"D:\Hosting\9372580\html\pearl\Pearl.mdb";

the character '\' begins what is called an "Escape Sequence", and it essentially that you're using 2 characters to represent 1(special) character.

for instance, \n is a newline character, \0 is null, and \\ is \


You need to use "\\" as "\" is an escape sequence.
http://msdn.microsoft.com/en-us/library/44ezxxy3(v=vs.80).aspx

Tags:

C#

Asp.Net