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

Script Timeout Problem

Status
Not open for further replies.

MnM

Programmer
Nov 1, 2000
47
US
(I am using Personal Web Server on a Windows95 computer) I have procedure that loops through different stores and gets the same information (different data) for every store. Thus I have sql statements in the loop to get the information. Before the loop I connect to the database and before every sql statement I connect to the recordset. And then after every sql statement I disconnect the recordset. Example:

Set rs1 = Server.CreateObject("ADODB.Recordset")
SQL3 = "Select SalesMTD from SalesAnalysis Where Store = 12
rs1.Open SQL3, conn
rs1.close
set rs1 = nothing

I thought by closing every recordset after I used them would speed things up. However it's still very slow and I also get this error:

error 'ASP 0113'
Script timed out

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.

In my asp code I have Server.ScriptTimeout = 500 and it still gives me the error. I am completely lost. I tried what I thought would work so now I have no clue as to how to fix this, could someone PLEASE HELP.
 
Dear MnM,

Just query the table once:

"Select SalesMTD from SalesAnalysis"

Then get the values from each store by looping through the recordset.

Good luck
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top