Pipe2Path
Programmer
- Aug 28, 2001
- 60
I am having some trouble connecting to my SQL server database. The name of the server as listed in Enterprise Manager is PIPE2PAT-CIV8A2\GRETZKY (Windows NT). This is under a SQL server group.
Here is the code I'm using in ado.net
SqlConnection nwindConn = new SqlConnection("Data Source=PIPE2PAT-CIV8A2\GRETZKY;Integrated Security=SSPI;Initial Catalog=northwind"
nwindConn.Open();
Now, when I compile this, it tells me I have an unrecognized escape sequence. If I take the PIPE2PAT-CIV8A2 out leaving only GRETZKY, I get a connection timeout when opening the connection.
The above code works just fine in VB6. Can anyone help?
Thanks in advance.
Here is the code I'm using in ado.net
SqlConnection nwindConn = new SqlConnection("Data Source=PIPE2PAT-CIV8A2\GRETZKY;Integrated Security=SSPI;Initial Catalog=northwind"
nwindConn.Open();
Now, when I compile this, it tells me I have an unrecognized escape sequence. If I take the PIPE2PAT-CIV8A2 out leaving only GRETZKY, I get a connection timeout when opening the connection.
The above code works just fine in VB6. Can anyone help?
Thanks in advance.