Problem connecting to SQL Server 2005 database instance
I have an old ASP app that I have had to migrate to use SQL Server 2005. I have two pages that are virtually identical (one is edit only the other makes provision for adding new records - I didn't write these apps but I am responsible for making them work now). One page connect successfully to the SQL Server Instance and the other does not. They are using EXACTLY the same connect string.
The only weird thing that has transpired is that we migrated to Active Directory recently. The ASP app that connects successfully was already on the web server prior to AD migration. The one that does not connect successfully was migrated after AD migration.
Further, the app that does not connect correctly when it is installed on my production web server does connect correctly when I am running it under IIS on my local development machine.
Anyone have any ideas about what could be wrong here? I'm suspecting that some credentialing issue is the problem as the big difference on the production web server is that the app that connects correctly from there was there pre AD migration and the app that does not connect correctly was not.
[1163 byte] By [
swells] at [2007-12-20]
The SQL Server instance is running behind a firewall on a fairly beefy Win 2003 server. The IIS server is a separate machine on WIN 2003 Server behind the same firewall.
The error message I get is as follows:
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
/jblol/od_sheets_edit/Od_sheets.asp, line 32
Here is the connection string section that will not connect (of course uid and pwd are changed to protect the guilty).
<%@ Language=VBScript %>
<!--#Include File = "Resources/adovbs.inc"-->
<script LANGUAGE="vbscript">
<!--
Sub button2_onclick
if FORM1.selORGANIZATION.value = "" then
msgbox "You must first select a location"
Exit Sub
End If
if FORM1.txtPart.value = "" then
msgbox "You must provide an Item Number"
Exit Sub
End If
FORM1.action = "QueryPart.asp"
FORM1.submit
End Sub
-->
</script>
<html>
<%
Dim rst, conn, strDeptText, strOperation
'Here's Where we will Customize Which Group of Data we are Querying........
strOperation = Request.QueryString("txtOperation")
Set conn = Server.CreateObject("ADODB.Connection")
Set rst = server.CreateObject("ADODB.Recordset")
conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=XXXXXX;Password=XXXXXX;Initial Catalog=OD_Sheets;Data Source=TSD0N1D01/TSDSQL200501"
conn.Open
Here is the section of pretty identical code that does connect properly.
<!--#Include File = "Resources/adovbs.inc"-->
<script LANGUAGE="vbscript">
<!--
Sub button2_onclick
if FORM1.selORGANIZATION.value = "" then
msgbox "You must first select a location"
Exit Sub
End If
if FORM1.txtPart.value = "" then
msgbox "You must provide a Item Number"
Exit Sub
End If
FORM1.action = "QueryPart.asp"
FORM1.submit
End Sub
-->
</script>
<html>
<%
Dim rst, conn, strDeptText, strOperation
'Here's Where we will Customize Which Group of Data we are Querying........
strOperation = Request.QueryString("txtOperation")
Set conn = Server.CreateObject("ADODB.Connection")
Set rst = server.CreateObject("ADODB.Recordset")
conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=XXXXXX;Password=XXXXXX;Initial Catalog=OD_Sheets;Data Source=TSD0N1D01\TSDSQL200501"
conn.Open
%>