Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have an ASP page calling data fro 1

Status
Not open for further replies.

sifitz

Programmer
Feb 27, 2002
47
0
0
GB
I have an ASP page calling data from a SQL Server 7 database. Every so often the page crashes with a timeout error (below in bold). It appears the problem only happens if there has been no access for a while (however connection pooling seems to be working properly and errors don't occur every time a new connection is made/pooling starts).

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC SQL Server Driver]Client unable to establish connection


I have a VB application making connection as well and there are no problems with that.

Any ideas?

Thanks

Si Fitz
 
Here is the code I am using:

Code:
' Set the ADO objects to be used for the results '
Dim objConn
Dim rstStaff
Dim strDBConnection

'Set the Database Connection String'
strDBConnection = "driver={SQL Server};server=zz-live-svr;Database=BNL_Core;User ID=webserver;Password=broker;"

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionTimeout = 15
Set rstStaff = Server.CreateObject("ADODB.Recordset")

I have always used this syntax and never this problem before though.

Si Fitz
 
Your code looks fine... hummm

Have you checked the "Client Network Utility" config on the server this is running on? Make sure you can connect with the "SQL query anaylzer" from the server? If the database is on the same machine as the web server you may want to use netbios as the default connection but if it is on another server you will want to change the default config to tcp/ip. This is what I have found to work the best.



Eric Repec
eric@ericrepec.com
If its not broke try it make it faster.....
 
I have changed the client config and the problem still occurs.

Another few points to see if this helps:

1: Any other connection to the database works (Enterprise manager, VB application query analyser etc.)
2: The database is actually running on a different machine to the ASP Page.
3: The problem only seems to occur when there has been no connections for a while (although I can see that all connections are disconnected and it works).

Si Fitz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top