Sunday, February 12, 2012

ASP.NET connection string problems with SQL Server 2000

My aspx page is trying to connect to a remote server with SQL Server 2000 installed on it, the ip of the server is 172.16.3.111 and the same is the instance of SQL Server, sql server is running in SQL Server Authentication mode, user id is "test" and password is "test123", name of database is myDB,the connection string which I am providing is as follows:

data source=172.16.3.111\172.16.3.111;user id=test;password=test123;initial catalog=myDB;"

But I am getting the following exception:

SQL Server does not exist or access denied.

even if I try the following connection string:
"data source=172.16.3.111;user id=test;password=test123;initial catalog=myDB;"

than also I get the same exception

even if provide the following connection strings:

"SERVER=172.16.3.111;UID=test;PWD=test123;DATABASE =myDB;"

"SERVER=172.16.3.111\172.16.3.111;UID=test;PWD=test123;DATABASE =myDB;"

than also I get the same exceptions

Can u please tell whats the problem,is the connection string correct,the DBA has also registered me "test" as a user on the SQL server.One thing which I want to mention is that through enterprise manager I can connect and use sql server without any problems,also please note that in VS.NET when I try connecting using server explorer and test the connection than I connect successfully, than why is problem occuring in connecting throug aspx page.

Try change the param "Server" like this:

\\ server name or server ip \ instance name

No comments:

Post a Comment