PDA

View Full Version : Error Asp 0113


Crash1hd
11-14-2002, 11:54 AM
I am getting the not enough time on server error msg almost like the script is not closing my page and then going to the last page! I had to reinstall windows and it was working before I reinstalled windows and now its not! I dont understand maybe something was messed up with my script or maybe something else! Help?

here is the script

<%
//Visitor information and Message was now saved to database; To create a simple table for displaying all data from database
//The ORDER BY DateField DESC is what makes everything show up newest to oldest remove to have it go oldest to newest
Set RS = Conn.Execute("select * from Thoughts")
do until RS.fields("SendThoughts") = Request.Form("FromField")

On Error Resume next
Dim ThereMail
Set ThereMail = CreateObject("CDONTS.NewMail")
ThereMail.From = Request.Form("FromField")
ThereMail.To = "(" & RS.fields("SendThoughts") & ")"
ThereMail.Subject = Request.Form("SubjectField")
ThereMail.BodyFormat = 0
ThereMail.MailFormat = Request.Form("MailFormatField")
ThereMail.Body = ("This is an automatic notification that<BR><B>") & _
Request.Form("NameField") & ("<B> Has Added A Msg To Tinas Thoughts Page On ") & date & (" At ") & time & _
("</B> <BR><BR>Goto <A href=Thoughts.asp>Tina's Thoughts Page</A> To View It<BR><BR>") & _
Request.Form("NameField") & ("<BR>Has Inputed The Following<BR><BR>") & _
Request.Form("Displayemail") & ("<BR><BR><a href='" & Request.Form("URLField") & "'>") & _
Request.Form("URLField") & ("</a><BR><BR>") & _
Request.Form("CityField") & (", ") & _
Request.Form("ProvinceField") & (" Canada<BR><BR><B>") & _
Request.Form("BodyField") & _
("<BR><BR>If you would like to be removed from this autonotification click here.<BR>")
ThereMail.Send
Set ThereMail = Nothing

RS.movenext
loop
//Don't forget to close database connection when all is done
Set RS = Nothing
Conn.Close
Set Conn = Nothing
%>


Let me know if you need more info?

Roelf
11-14-2002, 11:59 AM
did you alter the server.scripttimeout setting in IIS before you reïnstalled windows?? then maybe you should do this again

Crash1hd
11-14-2002, 12:05 PM
Ok SO I am an Idiot I even reinstalled windows cause I thought that was part of the problem I swear that it was working before but I figured out the error! Why is it that I always figure out the error just after I post the question to a message board doesnt matter what msg board either lol! Well I am glad I figured it out!

for anyone that was curious as to what the problem was I removed the Do and the loop from the page and emagine that when it works for me lol too funny

Thanks again everyone!

Crash1hd

rcreyes
11-14-2002, 01:44 PM
Add the following line in your ASP script to increase the time out
to 3 minutes (180 seconds)

Server.ScriptTimeout = 180


If this works, then you might want to configure your IIS - to do this:


Expand the tree and right-click Default Web Site (or the site that has the problem).
Click Properties.
Click the Home Directory tab.
Under Application Settings, click Configuration.
Click the App Options tab.
Increase the ASP Script Timeout value to a number high enough to prevent script timeouts

Thanks,
Ray

whammy
11-14-2002, 11:50 PM
Also, the way you're requesting the data probably caused the script to timeout. Instead of doing this:

Set RS = Conn.Execute("select * from Thoughts")
do until RS.fields("SendThoughts") = Request.Form("FromField")
'stuff here
loop

This would be much better:

MyQuery = "SELECT * FROM Thoughts WHERE SendThoughts = '" & Request.Form("FromField") & "'"
Set RS = Conn.Execute(MyQuery)

If NOT rs.EOF Then
'you found a matching record, so do something here
Else
'display something like "No record found"
End If


Also, the less fields you select, the better... so instead of using SELECT *, you should select only the fields you are going to use (unless it's all or nearly all of them, in which case that should be fine).

:)