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,
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,