|
-
Dec 12th, 2005, 05:12 AM
#1
Thread Starter
Frenzied Member
Script timeout displaying search results.
I've been given a website to fix and don't really have any ASP knowledge. There is a problem with a search that keeps having script time outs (script timeout is 2 minutes which should surely be ample?). By setting response.writes at various points i have managed to find where the app times out and it's at the following section:
Code:
</tr><% Do While Not objRs.EOF
iNetPrice = objRs.Fields(11).Value
iVATAmount = objRs.Fields(12).Value
iTotal = objRs.Fields(13).Value
iVATTotal = iVATTotal + iVATAmount
iNetTotal = iNetTotal + iNetPrice
iTotalTotal = iTotalTotal + iTotal%>
<tr <%=AlternateRow(i)%>>
<td class="Padded" align="center"><a href="<%=PageURL("PurchaseReq.asp", Array("PurchaseReqID", objRs.Fields(0).Value))%>"><%=objRs.Fields(1).Value%></a></td>
<td class="Padded" align="center"><% If Not IsNull(objRs.Fields(2).Value) Then Response.Write DateValue(objRs.Fields(2).Value) & "<br>" & objRs.Fields(3).Value End If%></td>
<td class="Padded" align="center"><% If Not IsNull(objRs.Fields(4).Value) Then Response.Write DateValue(objRs.Fields(4).Value) & "<br>" & objRs.Fields(5).Value End If%></td>
<td class="Padded" align="center"><% If Not IsNull(objRs.Fields(6).Value) Then Response.Write DateValue(objRs.Fields(6).Value) End If%></td>
<td class="Padded" align="center"><% If Not IsNull(objRs.Fields(7).Value) Then Response.Write DateValue(objRs.Fields(7).Value) & "<br>" & objRs.Fields(8).Value End If%></td>
<td class="Padded"><%=Replace(Server.HTMLEncode("" & objRs.Fields(9).Value), vbCrLf, "<br>")%></td>
<td class="Padded"><% GetCostCentres objRs.Fields(10).Value%></td>
<td class="Padded" align="right"><%=PageMoney(iNetPrice)%></td>
<td class="Padded" align="right"><%=PageMoney(iVATAmount)%></td>
<td class="Padded" align="right"><%=PageMoney(iTotal)%></td>
<td class="Padded"><%=objRs.Fields(14).Value%></td>
</tr>
<tr>
<th colspan="11"><img border="0" src="../../../images/1px.gif"></th>
</tr><% objRs.MoveNext
i = i +1
Loop
When run on my own machine the database is searched and results displayed in seconds any idea's why it might be timing out on the server?
Last edited by Fishcake; Dec 12th, 2005 at 05:16 AM.
-
Oct 19th, 2006, 02:38 PM
#2
New Member
Re: Script timeout displaying search results.
the response.writes won't show up until the page is fully rendered aka all processing is done. Instead, write messages to a debug / log file. It's good practice, because once it goes live, you can keep these messages from the web user, while having the ability to see what's going on when and if something is going wrong.
-
Oct 19th, 2006, 03:23 PM
#3
PowerPoster
Re: Script timeout displaying search results.
EDIT - Just Noticed this is from 2005! LOL
Last edited by rory; Oct 19th, 2006 at 03:28 PM.
-
Oct 19th, 2006, 07:15 PM
#4
Thread Starter
Frenzied Member
Re: Script timeout displaying search results.
hmmm interesting. I'm afraid I no longer remember the project.
I'm still rubbish at asp but thanks for the reply.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|