Error: Pending Requests working on this transaction

  • Thread starter Thread starter James Vitale
  • Start date Start date
J

James Vitale

Exception: System.Data.SqlClient.SqlException: The transaction operation
cannot be performed because there are pending requests working on this
transaction.

ASP.NET 2.0 running on Windows Server 2003 with MS SQL Server 2005

I have a web page that very simply takes a query string and inserts data
into my database.

On the insert there is a transaction. It has been in operation for quite
some time and has never had a problem. It executes two or three SQL
statements and if there are no errors it commits, othewise it rollsback.

For some reason, after the page runs for a while and takes a couple hundred
submissions, it starts giving me the error above. I can't find anything
about this error. I can't see how there could be pending requests working
on this transaction since there is only one call to the database.

How can I diagnose this problem?

Thanks,

James Vitale
 
Hi James,

This problem might be caused by several insert requests sharing the same
connection. Please check if it is true. If so, try to create a connection
each time you're doing an insert and close it immediately after use. This
might resolved the problem.

Kevin Yu
Microsoft Online Community Support

============================================================================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
============================================================================
==========================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
I've got this error recently when I forgot to close the IDataReader
while Commiting the transaction. The connection was still opened
however.
 
Back
Top