[thelist] Script Time Out in ASP

Michele Foster michele at wordpro.on.ca
Wed Oct 17 12:46:33 CDT 2001


Hi Folks ....

I knew this was going to happen one of these days.  This darn page takes
just too long to process.  Can anyone help me out with this error message
and advise what (and where) I should put in the Server.ScriptTimeOut
property.  I don't have access to the IIS admin tools.  How would I know
what the default timeout value is?

----------------
The error message:

error 'ASP 0113'
Script timed out

myfile.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.
----------------

Snipped version of the offending code is:

Set cnn = CreateObject("ADODB.Connection")
cnn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &
server.mappath("/mydatabasefile.mdb")
set rs = CreateObject("ADODB.Recordset")

SqlString = "SELECT email from emails"
rs.open SqlString,cnn

Do While Not rs.EOF

Set Mail=Server.CreateObject("Persits.MailSender")
Mail.Host="myhost.ca"

Mail.From="michele at myhost.ca"
Mail.FromName="Michele Foster"

Mail.AddAddress rs("email")

mail.Subject = "Newsletter - " & Date

mail.Body = body & message

mail.Send
Set mail = Nothing
number = number + 1
rs.MoveNext
Loop

Response.Write "<h2>Newsletter sent to " & number & " users.</h2>"

rs.Close
Set rs = Nothing
cnn.close
set cnn = Nothing


Thanks in advance.

Michele







More information about the thelist mailing list