ice78991
Programmer
- Nov 20, 2006
- 216
Cannot connect to SQL Server 2005 database in c#
In configuration manager I check the properties for my Names Pipes - Pipe Name which is
\\.\pipe\MSSQL$CLASSIFIEDS\sql\query
In Enterprise Manager The database name is given as
SV-S6LT9IW9SV\CLASSIFIEDS
I am using the connection string as follows
SqlConnection myConnection = new SqlConnection("user id=sa;" +
"password=xxxxxx;server=\\\\SV-S6LT9IW9SV\\CLASSIFIEDS;" +
"Trusted_Connection=yes;" +
"database=master;" +
"Network Library = dbnmpntw;" +
"connection timeout=30");
I wish to connect over named pipes. This has all been enabled on the server. But when I run the application, it stalls and no connection is made.
In configuration manager I check the properties for my Names Pipes - Pipe Name which is
\\.\pipe\MSSQL$CLASSIFIEDS\sql\query
In Enterprise Manager The database name is given as
SV-S6LT9IW9SV\CLASSIFIEDS
I am using the connection string as follows
SqlConnection myConnection = new SqlConnection("user id=sa;" +
"password=xxxxxx;server=\\\\SV-S6LT9IW9SV\\CLASSIFIEDS;" +
"Trusted_Connection=yes;" +
"database=master;" +
"Network Library = dbnmpntw;" +
"connection timeout=30");
I wish to connect over named pipes. This has all been enabled on the server. But when I run the application, it stalls and no connection is made.