Quantcast
Channel: VBForums - Database Development
Viewing all articles
Browse latest Browse all 2918

SQL SERVER on ASP page getting Timeout error

$
0
0
Hi all.
It's been years since I saw a timeout message, so I need some help here.

SQL Server database, webpage in classic ASP.

I am cycling through a list of appointments and sending out a reminder text, then I update the appt record to indicate a reminder was sent.

I was doing this through Javascript before, but it required a pop-up window for each text (the text is a URL sent to a website that in turn sends the texts and responds with a text string indicating success/fail) and that was clunky, so I switched to a small IFRAME for each text, and this puts the return strings at the bottom of the page to let me know if the texts were sent out.

Everything worked perfectly with text messages being sent and text strings lined up at the bottom of the page, until I added back in the line to update the database.
<%
SQL= {select all the appointments for tomorrow}
set rs=server.createobject("ADODB.recordset")
Rs.Open SQL, conn,1,2
Do until RS.eof%>
<iframe id="IFRAME<%=RS("ID")%>" width="80%" height="60" scrolling="auto" frameborder="0" src="{website that sends the text with details in parameter string}"></iframe><Br><BR>

<%
'now update the record so it shows as sent
Conn.Execute "Update tblAppts set Reminder = 1 where ID = " & RS("ID") 'THIS IS THE LINE GIVING THE TIMEOUT ERROR EVEN THOUGH IT WORKED FINE BEFORE
RS.Movenext
Loop%>

The above is a cleaned up version of the code. Again, it all works fine if I don't do the UPDATE line. I haven't seen a TIMEOUT error in years and I don't know what the problem is.
The error is happening on the very first appt. The Iframe is built, the text is sent, return string appears in the iframe, then the Conn.Execute line says timeout:

Microsoft OLE DB Provider for ODBC Drivers error '80040e31'

[Microsoft][ODBC SQL Server Driver]Query timeout expired

/sms.asp, line 156

This website has been used by my wife in her office for about 10 years, and I've always had Session.Timeout = 60. I changed it to 300 but that didn't change anything.
And, again, the UPDATE line was working perfectly when I was using Javascript to open a window and go to the texting URL.
What could the problem be? More importantly, how do I solve it?
Thanks.

Viewing all articles
Browse latest Browse all 2918

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>