Hi All,
I am trying to connect to an SQL SERVER in a remote production server from ASP.net using following code.
Dim conProd As New OleDbConnection ("Provider=SQLO LEDB.1;Data Source=ServerNa me;UID=User Name;PWD=Passwo rd;Initial Catalog=Databas e")
conProd.Open()
I am getting following error while running this script
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
But I am able to connect to this server using following three other ways:
1) Using query analyzer
2) I created DSN and performed test connection, it succeded.
3) In ASP.NET -> Server Explorer -> Data Connections, I added this connection and test connection also successful.
I tried to connect to this server in VB 6.0 using following code
Dim conProd As New ADODB.Connectio n
conProd.Open "Provider=SQLOL EDB;Data Source=ServerNa me;Initial Catalog=Databas e; Timeout=500;", "UserName", "Password"
I am able to connect using this above code in VB 6.0 also.
But I dont what is happeing in .NET. Please help me.
I am using XP and VS .NET 2003
I am trying to connect to an SQL SERVER in a remote production server from ASP.net using following code.
Dim conProd As New OleDbConnection ("Provider=SQLO LEDB.1;Data Source=ServerNa me;UID=User Name;PWD=Passwo rd;Initial Catalog=Databas e")
conProd.Open()
I am getting following error while running this script
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
But I am able to connect to this server using following three other ways:
1) Using query analyzer
2) I created DSN and performed test connection, it succeded.
3) In ASP.NET -> Server Explorer -> Data Connections, I added this connection and test connection also successful.
I tried to connect to this server in VB 6.0 using following code
Dim conProd As New ADODB.Connectio n
conProd.Open "Provider=SQLOL EDB;Data Source=ServerNa me;Initial Catalog=Databas e; Timeout=500;", "UserName", "Password"
I am able to connect using this above code in VB 6.0 also.
But I dont what is happeing in .NET. Please help me.
I am using XP and VS .NET 2003
Comment