Unable to connect to sql database only from asp

Posted by Brian on Stack Overflow See other posts from Stack Overflow or by Brian
Published on 2010-04-26T21:34:17Z Indexed on 2010/04/26 22:03 UTC
Read the original article Hit count: 250

Filed under:
|
|

In a VB6 program:

Dim conn As Object
Set conn = CreateObject("ADODB.Connection") 
conn.Open "DRIVER={SQL Server}; Server=(local)\aaa; Database=bbb; UID=ccc; PWD=ddd"

In an ASP program:

Sub ProcessSqlServer(conn)
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open "DRIVER={SQL Server}; Server=(local)\aaa; Database=bbb; UID=ccc; PWD=ddd"

The VB6 program works, the ASP program does not (see error below). I tried checking the event log for errors, but found nothing. Or more precisely, I did find local an activation permission error, but this was fixed once I added local launch/activation permission for Network Service to the Machine Debug Manager via the component services tool.

Error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
[Microsoft][ODBC SQL Server Driver]Timeout expired

© Stack Overflow or respective owner

Related posts about asp-classic

Related posts about adodb