Using WaitFor1.0 issue

J

JayB

After searcing the archives and www.aspfaq.com I found software called
waitfor1.0 that I can use to make my script pause for a few seconds before
resuming. I'm using this to send email to a list of subscribers on our
database (about 10,000). I want to send 250 emails, wait for a little bit,
send another 250 and so on until all emails are sent. If I set it up so it
pauses for two seconds, it works fine. When I pause it for five seconds, I
get an error pop-up that says 'The document contains no data'.

Is this a timeout issue with ASP or may SQL Server (where the data is)? Any
other suggestions or ideas?

In the following example I'm simply trying to write the email addresses to
the browser. This is my test environment and is also where I'm getting the
error message.

<%
Dim rs, ConStr, conn, i, WaitObj

Set WaitObj = Server.CreateObject ("WaitFor.Comp")
ConStr = "Provider=SQLOLEDB; Data Source=PCIS; Database=E-News_Test; User
Id=jerry; Password=jerry"
set conn = CreateObject("ADODB.Connection")
conn.open ConStr
set rs = conn.execute("EXEC enewsSendTesth")

do while not rs.eof
strCount = strCount + 1
response.write strCount & ". " & rs("EmailAddress") & " " & time &
"<br>"
rs.movenext
if i = 249 then
WaitObj.WaitForSeconds 5
i = 0
else
i = i + 1
end if
loop

rs.close
Set conn = nothing
Set rs = nothing
Set WaitObj = nothing
%>

Thanks,
 
J

JayB

JayB said:
After searcing the archives and www.aspfaq.com I found software called
waitfor1.0 that I can use to make my script pause for a few seconds before
resuming. I'm using this to send email to a list of subscribers on our
database (about 10,000). I want to send 250 emails, wait for a little bit,
send another 250 and so on until all emails are sent. If I set it up so it
pauses for two seconds, it works fine. When I pause it for five seconds, I
get an error pop-up that says 'The document contains no data'.

Is this a timeout issue with ASP or may SQL Server (where the data is)?
Any other suggestions or ideas?

It was the timeout setting for my IIS. I had to increase it to allow my
script to finish running (it's located on an internal server, not a public
web server).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top