• Advertisement
Sign in to follow this  

[.net] SQL Server 2005 Express and Remote Connections (TCP/IP)?

This topic is 4297 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okay, this is a simple one. But I wanted to ask, as I don't have any means of testing it right now. I don't have the internet hooked up to my computer yet. =P Well, I have VS .NET 2005 Pro and SQL Server 2005 Express. The server name is default, SQLEXPRESS. And I have no problems whatsoever connecting to it on the local machine. But, if I enable the TCP/IP protocol, how can someone else (using a client app. I write) access the server, to read a database? I know when you create the Connection String for the 'SqlConnection' object you do "DataSource=.\\SQLEXPRESS;etc." for a local connection. But would you simply put "DataSource=127.0.0.1\\SQLEXPRESS", for example? Or is there some other way you have to do it? Thanks in advance, Matt U.

Share this post


Link to post
Share on other sites
Advertisement
From ConnectionStrings.com

Quote:

Standard Security:

"Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;"
- or -
"Server=Aron1;Database=pubs;User ID=sa;Password=asdasd;Trusted_Connection=False"
(both connection strings produces the same result)




Trusted Connection:

"Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;"
- or -
"Server=Aron1;Database=pubs;Trusted_Connection=True;"
(both connection strings produces the same result)

(use serverName\instanceName as Data Source to use an specifik SQLServer instance)

Connect via an IP address:
"Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd;"
(DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default))




Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement