Graeme McGilvray
asked on
Server Timeout with Loop
Hi there, for some reason I am having a server timeout with my loop, cant figure it out
What ends up happening is that outputs 43537 times... where as I want to output 1,2,3,4,5 - ideas?
DayCount=0
Do Until DayCount>=4
DayCount=DayCount+1
Response.Write(DayCount&"<br>")
Loop
What ends up happening is that outputs 43537 times... where as I want to output 1,2,3,4,5 - ideas?
ASKER
Hi Ryan, yeah it should, however it is producing alot more :(
43525
43526
43527
43528
43529
43530
43531
43532
43533
43534
43535
43536
43537
Active Server Pages error 'ASP 0113'
Script timed out
/admingpt.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.
can you post full codes here?
ASKER
DayCount=0
Do Until DayCount>=Request.Form("itindays")
DayCount=DayCount+1
oConn.Execute("INSERT INTO itin_days(itin_ID,brand_ID,itin_day,itin_arrcity,day_added,day_cons) VALUES("&ItinID&",'GPT',"&DayCount&",'"&ItinLocation("location_IATA")&"','"&NOW()&"',2000)")
Response.Write(DayCount&"<br>")
Loop
I have Response Wrote - Request.Form("itindays") and that = 4
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked!
How strange!
Thanks mate!
How strange!
Thanks mate!
by using this codes, it should generate this as the output:
Open in new window
Are you reusing/reassigning the variable: DayCount somewhere in your codes?