
HELP: ASP / SQL Server connection hangs when user aborts processing
Hi,
I have an ASP application that connects to an SQL Server database that
allows users to search for company documents and return salient details
to a search results page.
The users supply search criteria from a form that is then used to search
the database, I have error checking (using the Error object) to ensure
that any problems with the database connection or the recordsets it
returns force a critical error that stops the ASP from processing any
further.
This works fine, however when an error occurs or the users "escape"
from the page while the ASP is still executing there is a period of time
whereby the connection between the ASP and the database seems to hang
and no further queries result in recordsets being returned. After a minutes
normal processing resumes and recordsets are returned from queries.
Not being an SQL expert I am guessing that the premature end of the ASP
processing possibly results in a lock of some sort not being released on the
SQL database and its a server-side timeout that release the lock and then
allows futher processing of the ASP to result in data being returned.
Can anyone explain whether this is what is happening and how I can get
around it from ASP. The SQL server supports databases accessed from
Windows applications as well as this ASP application so this is the first
time this problem has been encountered.
Thanks in advance,
SpLiT.