Connection String error

  • Thread starter Thread starter Phill
  • Start date Start date
P

Phill

I am trying to execute a stored procedure in MSDE. I
have SQL Server loaded on the same machine so I installed
it with an instance name of MSDE, the computer name is
PSHAW. I tried using the following connection string but
I get an error saying "unrecognized escape sequence".

_connectionString="Data
Source=PSHAW\MSDE;UID=sa;pwd=;Database=MyDB";

I can connect to my SQL Server database by using
_connectionString="Data Source=
(local);UID=sa;pwd=;Database=MISD";

What is the problem? Thank you.
 
Its because you have a "\" in the middle of your string. Try
_connectionString=@"Data Source=PSHAW\MSDE;UID=sa;pwd=;Database=MyDB";

Greg
 
Back
Top