How do i specify that i want to use TCP/IP to connect to SQL server

G

George Ter-Saakov

Hi.

After upgrading to Windows 2003 NetPipes not working anymore when trying to
connect to SQL.
I guess some security tweaking needed but our admins do not know how to
enable it.

How can i specify that i want to connect using TCP/IP using
System.Data.SqlClient.SqlConnection

Right now i am connecting
"server=devcdc013;Trusted_Connection=false;database=Solution;User
ID=uid;Password=pwd"


Thanks.
George.
 
K

Kevin Spencer

Hi George,

You would do this in your Connection String. Example:

Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial
Catalog=pubs;User ID=sa;Password=asdasd;

The "Network Library" attribute is the one that specifies TCP/IP ("DBMSSOCN"
= TCP/IP) . In the "Data Source" the ",1433" is the port number, which is
not necessary unless you are using a non-default port (1433 is the default).

Credit where Credit is due: I copied this Connection String from
http://www.connectionstrings.com, an awesome reference for Connection
Strings!

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
G

George Ter-Saakov

Thanks.
This is what i needed.

Totally forgot about this site. I saw it couple years ago :)

George.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top