CodingIsFun
Programmer
I am a newbie to the .NET Environment. I developed a small web page to test connecting to an MS SQL 2000 database on a local machine.
The Stored Prodedure executed just fine. I moved this to a new web server to test data connections and received an error on the conn.Open() function. The error stated Server Does not Exist or No permissions. I can open the SQL Server up in Server Explorer using .NET 2003 on the new Web Server.
The following is my code. Any help would be greatly appreciated.
Private sproc As String, connString As String, conn As SqlConnection
Public CMD As SqlCommand
connString = "User ID = sa; Password = ;database = test; Server = BOX1\SQL1; Connect Timeout = 60"
conn = New SqlConnection(connString)
CMD = New SqlCommand
With CMD
.Connection = conn
.CommandType = CommandType.StoredProcedure
.CommandText = "test_proc"
End With
conn.open()
Thanks again..
The Stored Prodedure executed just fine. I moved this to a new web server to test data connections and received an error on the conn.Open() function. The error stated Server Does not Exist or No permissions. I can open the SQL Server up in Server Explorer using .NET 2003 on the new Web Server.
The following is my code. Any help would be greatly appreciated.
Private sproc As String, connString As String, conn As SqlConnection
Public CMD As SqlCommand
connString = "User ID = sa; Password = ;database = test; Server = BOX1\SQL1; Connect Timeout = 60"
conn = New SqlConnection(connString)
CMD = New SqlCommand
With CMD
.Connection = conn
.CommandType = CommandType.StoredProcedure
.CommandText = "test_proc"
End With
conn.open()
Thanks again..