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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ScriptTimeout being ignored

Status
Not open for further replies.

TheCandyman

Technical User
Sep 9, 2002
761
US
I have a web app runing on IIS6, the page pulls info correctly as it did from a previous server but it just takes some time to do it(about a minute). My code fix was adding in the scripttimeout, but that doesn't seem to work anymore, i had this:

Code:
<%
ScriptTimeout=100
...
...
Dim AttendeeGroup
Set AttendeeGroup = Server.CreateObject("ADODB.Recordset")
AttendeeGroup.ActiveConnection = MM_data_STRING
AttendeeGroup.Source = "SELECT DISTINCTROW Sum(Cost) AS AttendeeCost FROM tbl_Attendee GROUP BY GPID;"
AttendeeGroup.CursorType = 3
AttendeeGroup.CursorLocation = 2
AttendeeGroup.LockType = 1
AttendeeGroup.Open()
Error is:
Code:
Active Server Pages error 'ASP 0113' 
Script timed out 

Totals.asp 

The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
 
I changed it to that, and it still have the same problem.
 
How long does it take to just execute the query against your database using Query Analyzer or Toad or somesuch tool?
 
It takes about 20 sec to just run queries in the DB. But pulling and displaying takes longer.

I did find this which sounds like my problem, but i can't seem to get it to work.


Code:
Dim AttendeeGroup
Set AttendeeGroup = Server.CreateObject("ADODB.Recordset")
AttendeeGroup.ActiveConnection = MM_data_STRING
AttendeeGroup.ConnectionTimeout=30

But i get an error
Code:
Microsoft VBScript runtime  error '800a01b6'
Object doesn't support this property or method: 'ConnectionTimeout'
 
Set AttendeeGroup = Server.CreateObject("ADODB.[red]Recordset[/red]Connection")

-DNG
 
You might try looking at your connection object and using the .CommandTimeout property. For more information on it, check here.

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top