ConnectionString for Server
-
I want my client app connecting to an external server with IP 1.1.1.1 for example. The database is called "WORK" I tried to use URI
Uri url = new Uri("http://1.1.1.1/); connDB = new SqlConnection(); connDB.ConnectionString="data source="+url.Host+" + "initial catalog=WORK;" + "user id=me;" + "pwd=me;" + "packet size=4096;" + "persist security info=false;"; connDB.Open();
doesn't work... Also if I am trying to access the local server db, it fails. Even if data source is (local). How can I access external server's db by IP ? -
I want my client app connecting to an external server with IP 1.1.1.1 for example. The database is called "WORK" I tried to use URI
Uri url = new Uri("http://1.1.1.1/); connDB = new SqlConnection(); connDB.ConnectionString="data source="+url.Host+" + "initial catalog=WORK;" + "user id=me;" + "pwd=me;" + "packet size=4096;" + "persist security info=false;"; connDB.Open();
doesn't work... Also if I am trying to access the local server db, it fails. Even if data source is (local). How can I access external server's db by IP ?Vector7 wrote: doesn't work... Could you give more details? What is the error message? Yes, even I am blogging now!
-
Vector7 wrote: doesn't work... Could you give more details? What is the error message? Yes, even I am blogging now!
-
I want my client app connecting to an external server with IP 1.1.1.1 for example. The database is called "WORK" I tried to use URI
Uri url = new Uri("http://1.1.1.1/); connDB = new SqlConnection(); connDB.ConnectionString="data source="+url.Host+" + "initial catalog=WORK;" + "user id=me;" + "pwd=me;" + "packet size=4096;" + "persist security info=false;"; connDB.Open();
doesn't work... Also if I am trying to access the local server db, it fails. Even if data source is (local). How can I access external server's db by IP ? -
I want my client app connecting to an external server with IP 1.1.1.1 for example. The database is called "WORK" I tried to use URI
Uri url = new Uri("http://1.1.1.1/); connDB = new SqlConnection(); connDB.ConnectionString="data source="+url.Host+" + "initial catalog=WORK;" + "user id=me;" + "pwd=me;" + "packet size=4096;" + "persist security info=false;"; connDB.Open();
doesn't work... Also if I am trying to access the local server db, it fails. Even if data source is (local). How can I access external server's db by IP ?I don't know if it may be the case, but try removing that
http://
prefix in the URL. That prefix indicates it is HTTP protocol (for web pages) and the server address is only the IP. -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!
-
'SQL Server does not exist or access denied' If I am right, there only can one instance of SQL Server at the same time ?
Vector7 wrote: If I am right, there only can one instance of SQL Server at the same time ? Actually there can be many (I think up to 16, but I'm not sure). Suppose the server is called SERVER. The default instance is unnamed and thus is accessed with SERVER. The other instances are named (say SQLSRV1) and it's accessed with SERVER\SQLSRV1. -- LuisR
Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!