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

Timeout Help!

Status
Not open for further replies.

siuk

Programmer
Aug 23, 2001
38
GB
Hi im trying to query a huge database, anyone know how I can stop this producing a "timeout Expired" ?

strSQL6 = "sp_my_stored1 'siuk','p','"start_date&"'"
set report6=objconn.execute(strSQL6)
report6.timeout = 200 <--- This is my guess???
do while not report6.eof

response.write(report6(0))
response.write(&quot; | &quot;)
response.write(report6(1))
response.write(&quot;<br>&quot;)

report6.movenext
loop
report6.close

Many Thanks
 
Maybe putting this on top of your asp page helps:
<%Server.ScriptTimeout=120%>
Here is what I could find in the msdn library:

Server.ScriptTimeout = NumSeconds

Parameters
NumSeconds
Specifies the maximum number of seconds that a script can run before the server terminates it. The default value is 90 seconds.
Remarks
A default ScriptTimeout can be set for a Web Service or Web Server by using theAspScriptTimeout property in the metabase. The ScriptTimeout property cannot be set to a value less than that specified in the metabase. For example, if NumSeconds is set to 10, and the metabase setting contains the default value of 90 seconds, scripts will time out after 90 seconds. However, if NumSeconds were set to 100, the scripts would time out after 100 seconds.

For more information about using the metabase, see About the Metabase

Example
The following example causes scripts to time out if the server takes longer than 100 seconds to process them.

<% Server.ScriptTimeout = 100 %>

The following example retrieves the current value of the ScriptTimeout property and stores it in the variable TimeOut.

<% TimeOut = Server.ScriptTimeout %>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top