If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > ASP + SQL 2K - Timeout Expired on One Specific Table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-01-03, 16:08
Bagload Bagload is offline
Registered User
 
Join Date: Oct 2003
Location: Glasgow, UK
Posts: 8
ASP + SQL 2K - Timeout Expired on One Specific Table

Hello

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:

Code:
<% Option Explicit
Dim objConn, objRs
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open Application("Database_ConnectionString")
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
		objRs.MoveNext
	Loop
End If
objRs.Close
objConn.Close
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:

Code:
Microsoft OLE DB Provider for SQL Server error '80040e31' 

Timeout expired 

/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.

David Morgan
Reply With Quote
  #2 (permalink)  
Old 10-01-03, 18:58
bill_dev bill_dev is offline
Registered User
 
Join Date: Sep 2003
Posts: 60
A thought...Does your connect string differ?
E.g. MyCon.Open("provider=msolap; Datasource=LocalHost; Initial Catalog=FoodMart 2000; Connect Timeout=120")
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On