Unanswered: ASP + SQL 2K - Timeout Expired on One Specific Table
I am pulling my hair out here. I have been doing ASP/SQL websites since 1996 but I have come across a problem which I cannot seem find any resolution to.
Why on earth would I get a timeout with the following:
<% Option Explicit
Dim objConn, objRs
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRs = objConn.Execute("SELECT * FROM dbo.tbl2WaySessions")
If Not objRs.EOF Then
Do While Not objRs.EOF
Response.Write "<p>" & objRs.Fields(0).Value
Set objConn = Nothing %>
This is a page from a site with hundreds of visitors a day. I have just created a new table and a different page that uses it and I have come across this problem. I started to work backwards and ended up with the simple code above which I just cannot believe gives the following error:
Microsoft OLE DB Provider for SQL Server error '80040e31'
/debug/isuniquesessionid.asp, line 6
What is most annoying is that this problem only occurs on my production server and not my staging server. They are both at the same MDAC and SQL SP levels.
There are no records in the table at the moment, so for this first attempt I should be getting an EOF anyway.
As previously mentioned, there are about 40 tables in this database and about 100 ASPs, all using exactly the same kind of syntax etc. with tables created in exactly the same way.
When I look at the command in SQL Profiler I see no errors or warnings and definately less detail than with a statement that executes successfully. Normally the text will be repeated about four times with different event classes. This statement it only appears once as SQL:BatchCompleted.
Any help with this would be very much appreciated.