Connection String error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Phill

    #1

    Connection String error

    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 "unrecogniz ed escape sequence".

    _connectionStri ng="Data
    Source=PSHAW\MS DE;UID=sa;pwd=; Database=MyDB";

    I can connect to my SQL Server database by using
    _connectionStri ng="Data Source=
    (local);UID=sa; pwd=;Database=M ISD";

    What is the problem? Thank you.
  • Greg Bacchus

    #2
    Re: Connection String error

    Its because you have a "\" in the middle of your string. Try
    _connectionStri ng=@"Data Source=PSHAW\MS DE;UID=sa;pwd=; Database=MyDB";

    Greg

    "Phill" <pshaw@proceedt ech.com> wrote in message
    news:07ab01c366 b5$134d69a0$a30 1280a@phx.gbl.. .[color=blue]
    > 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 "unrecogniz ed escape sequence".
    >
    > _connectionStri ng="Data
    > Source=PSHAW\MS DE;UID=sa;pwd=; Database=MyDB";
    >
    > I can connect to my SQL Server database by using
    > _connectionStri ng="Data Source=
    > (local);UID=sa; pwd=;Database=M ISD";
    >
    > What is the problem? Thank you.[/color]


    Comment

    Working...