I have an application that was programmed in Classic ASP VB Script and used to connect to Access. I'm trying to change the connection string to connect to our new SQL Server 2005 development server (within the network, then eventually to our production server outside the network). So far, no luck connecting to the Development server. I keep getting this error:
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
, line 12
I have no idea if TCP/IP is set up on the machine nor do I know how to check. I've also tried using the IP address as the Data Source instead of the machine name, but get the same error.
Right now we are stuck with Classic ASP (will be converting to C# and .NET in a while, but not for now). Is there a better way to connect in classic ASP than I am using? What am I doing wrong?
set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "PROVIDER=SQLOLEDB; Data Source=AUDCMS01; Initial Catalog=ruUtility; Persist Security Info=True; Network=OURNETWORK; User ID=user; password=pass"
set rsMAX = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT Max(ID) AS MaxOfID FROM programsOfStudyDetails;"
rsMAX.Open SQL, Conn
maxID = rsMAX("MaxOfID")
if maxID <> "" then
Response.Write "Connected! MAX ID=" & maxID
Response.Write "Not Connected"
Set rsMAX = Nothing
Set Conn = Nothing %>