473,324 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Active Server Pages error 'ASP 0113' Script timed out

I am constantly getting the 'Script timed out' error, and would like to see
if there is any way I could modify the ASP page.

I think I did all I could to improved the performance at the database table
level, but when it comes to the ASP, the error occurs most of time.
This error happens when this ASP page has been moved to a new server.

I modified the "server.ScriptTimeout = " at the ASP and also at IIS.
The report does not retrieve the whole records, but it stops in the middle,
and giving this error message.

I am also curious whether .AbsolutePosition might be a factor? But on the
previous server, I had no problem.

Here is the part of ASP page where it retrieves a data.

strSQL = "spHWABPOOrderSelect_1 " & nAcctNum
Dim rsHBSBPOOrder : Set rsHWABPOOrder = New clsRecordSet
With rsHBSBPOOrder
.ConnectionString = ConnHBS
.Load(strSQL)
Dim nTmp
Do While Not .EOF
if .AbsolutePosition = 0 Then
nBPO1Val = Trim(.Fields("curBPOAsIs")&"")
If Len(nBPO1Val) <0 Then
nBPO1Val = FormatCurrency(nBPO1Val, 0)
End If
nTmp = nBPO1Val
dtBPO1 = Trim(.Fields("dtReceived")&"")
ElseIf .AbsolutePosition = 1 Then
nBPO2Val = Trim(.Fields("curBPOAsIs")&"")
If Len(nBPO2Val) = 0 Then
nBPO2Val = nTmp
Else
nBPO2Val = FormatCurrency(nBPO2Val, 0)
End If
dtBPO2 = Trim(.Fields("dtReceived")&"")
End If
.MoveNext
Loop
End With
Set rsHWABPOOrder = Nothing
Sep 29 '08 #1
3 10548
This procedure can never return more than 2 records?
If it can, why are you bothering to continue looping through it when
absoluteposition is 1?
Also, why don't you rewrite the procedure to only return two records?

You don't show where the value contained in nAcctNum comes from, but you
are aware that using this technique to execute a procedure leaves you
vulnerable to sql injection, don't you?

Justin Doh wrote:
I am constantly getting the 'Script timed out' error, and would like
to see if there is any way I could modify the ASP page.

I think I did all I could to improved the performance at the database
table level, but when it comes to the ASP, the error occurs most of
time.
This error happens when this ASP page has been moved to a new server.

I modified the "server.ScriptTimeout = " at the ASP and also at IIS.
The report does not retrieve the whole records, but it stops in the
middle, and giving this error message.

I am also curious whether .AbsolutePosition might be a factor? But on
the previous server, I had no problem.

Here is the part of ASP page where it retrieves a data.

strSQL = "spHWABPOOrderSelect_1 " & nAcctNum
Dim rsHBSBPOOrder : Set rsHWABPOOrder = New clsRecordSet
With rsHBSBPOOrder
.ConnectionString = ConnHBS
.Load(strSQL)
Dim nTmp
Do While Not .EOF
if .AbsolutePosition = 0 Then
nBPO1Val = Trim(.Fields("curBPOAsIs")&"")
If Len(nBPO1Val) <0 Then
nBPO1Val = FormatCurrency(nBPO1Val, 0)
End If
nTmp = nBPO1Val
dtBPO1 = Trim(.Fields("dtReceived")&"")
ElseIf .AbsolutePosition = 1 Then
nBPO2Val = Trim(.Fields("curBPOAsIs")&"")
If Len(nBPO2Val) = 0 Then
nBPO2Val = nTmp
Else
nBPO2Val = FormatCurrency(nBPO2Val, 0)
End If
dtBPO2 = Trim(.Fields("dtReceived")&"")
End If
.MoveNext
Loop
End With
Set rsHWABPOOrder = Nothing
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Sep 29 '08 #2
Hi Bob,

I appreciate for your feedback.

I am not sure how I could modify the Do While Loop..
Do you have any suggestions?
I know I am only getting two values, but doesn't it have to go through the
end of file?

Regards to your second feedback, I am not sure what you meant.
>You don't show where the value contained in nAcctNum comes from, but you
are aware that using this technique to execute a procedure leaves you
vulnerable to sql injection, don't you?

"Bob Barrows [MVP]" wrote:
This procedure can never return more than 2 records?
If it can, why are you bothering to continue looping through it when
absoluteposition is 1?
Also, why don't you rewrite the procedure to only return two records?

You don't show where the value contained in nAcctNum comes from, but you
are aware that using this technique to execute a procedure leaves you
vulnerable to sql injection, don't you?

Justin Doh wrote:
I am constantly getting the 'Script timed out' error, and would like
to see if there is any way I could modify the ASP page.

I think I did all I could to improved the performance at the database
table level, but when it comes to the ASP, the error occurs most of
time.
This error happens when this ASP page has been moved to a new server.

I modified the "server.ScriptTimeout = " at the ASP and also at IIS.
The report does not retrieve the whole records, but it stops in the
middle, and giving this error message.

I am also curious whether .AbsolutePosition might be a factor? But on
the previous server, I had no problem.

Here is the part of ASP page where it retrieves a data.

strSQL = "spHWABPOOrderSelect_1 " & nAcctNum
Dim rsHBSBPOOrder : Set rsHWABPOOrder = New clsRecordSet
With rsHBSBPOOrder
.ConnectionString = ConnHBS
.Load(strSQL)
Dim nTmp
Do While Not .EOF
if .AbsolutePosition = 0 Then
nBPO1Val = Trim(.Fields("curBPOAsIs")&"")
If Len(nBPO1Val) <0 Then
nBPO1Val = FormatCurrency(nBPO1Val, 0)
End If
nTmp = nBPO1Val
dtBPO1 = Trim(.Fields("dtReceived")&"")
ElseIf .AbsolutePosition = 1 Then
nBPO2Val = Trim(.Fields("curBPOAsIs")&"")
If Len(nBPO2Val) = 0 Then
nBPO2Val = nTmp
Else
nBPO2Val = FormatCurrency(nBPO2Val, 0)
End If
dtBPO2 = Trim(.Fields("dtReceived")&"")
End If
.MoveNext
Loop
End With
Set rsHWABPOOrder = Nothing

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Sep 29 '08 #3

Justin Doh wrote:
Hi Bob,

I appreciate for your feedback.

I am not sure how I could modify the Do While Loop..
Do you have any suggestions?
I know I am only getting two values, but doesn't it have to go
through the end of file?
No. If you are only getting two records, you don't even need a loop.

With rsHBSBPOOrder
.ConnectionString = ConnHBS
.Load(strSQL)
Dim nTmp
If not .EOF Then
'recordset is automatically pointing at first record
If Len(nBPO1Val) <0 Then
nBPO1Val = FormatCurrency(nBPO1Val, 0)
End If
nTmp = nBPO1Val
dtBPO1 = Trim(.Fields("dtReceived")&"")
.MoveNext
If not .EOF Then
'recordset is now pointing at second record
nBPO2Val = Trim(.Fields("curBPOAsIs")&"")
If Len(nBPO2Val) = 0 Then
nBPO2Val = nTmp
Else
nBPO2Val = FormatCurrency(nBPO2Val, 0)
End If
dtBPO2 = Trim(.Fields("dtReceived")&"")
End If
End If
..Close '<---
End With
Set rsHWABPOOrder = Nothing

<--- I added the .Close statement, but I recognize I may not have had
to. Does your clsRecordSet class have a Terminate event in which the
recordset and connection are closed? I do hope you are explicitly
closing the database connection ...
>
Regards to your second feedback, I am not sure what you meant.
>You don't show where the value contained in nAcctNum comes from, but
you are aware that using this technique to execute a procedure
leaves you vulnerable to sql injection, don't you?

See what happens if nAcctNum contains something like

1234;create table test (testcol int);

Read about sql injection in these links:
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23
http://www.nextgenss.com/papers/adva..._injection.pdf
http://www.nextgenss.com/papers/more..._injection.pdf
http://www.spidynamics.com/papers/SQ...WhitePaper.pdf

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Sep 29 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lokesh | last post by:
Hi All, When i am accessing the website i am getting this error: Active Server Pages error 'ASP 0115' Unexpected error /hradmin/Default.asp
6
by: THE BIG MAN | last post by:
I am getting the errror Active Server Pages error 'ASP 0141' Page Command Repeated /contactform.asp, line 12 The @ command can only be used once within the Active Server Page. Anybody know...
11
by: www.MessageMazes.com | last post by:
I sometimes get this error after about 60 seconds of "waiting for mazes.com" (but when the page works, it usually loads in less than 12 seconds). > Active Server Pages error 'ASP 0113' > Script...
1
by: george | last post by:
Hi all, here's my index.asp file. I don't know where has gone wrong. can't run properly, just showing error ASP 0113 Script timeout <!--#include file="head.asp"--> <!-- begin...
0
by: DY1 | last post by:
I have this message appearing on the webpage I intend to visit: ________________________________________________________ Active Server Pages error 'ASP 0126' Include file not found ...
0
by: pervaiz | last post by:
Hi, I have a Web site that is developed in ASP it is currently hosted on windows XP previously it was working fine but for the past few days it is giving this error "Active Server Pages error...
20
by: =?Utf-8?B?SnVzdGluIERvaA==?= | last post by:
"Active Server Pages error 'ASP 0113' Script timed out" I am still getting this error, and I am not sure how I could fix this. When I execute the query at SQL 2005, it only takes 8 seconds....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.