• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

Transaction in ASP?

If I am tring to do the following Transaction,it's giving me error....

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
Can not start transaction while in firehose mode.

        conn.execute "Update aid set aid=" &myaid
      conn.execute useradsql
      conn.execute descsql
      conn.execute myultimatesql
Please give me sugestion on how to do batch transaction in ASP.
1 Solution
tonytparkAuthor Commented:
Edited text of question.
tonytparkAuthor Commented:
Edited text of question.
Have you thought of writing a stored procedure and then passing useradsql, descsql, myultimatesql as parameters ?
I have looked i MSDN about firehose and look at this:

"With forward-scrolling, read-only cursors (also known as firehose cursors) against SQL Server, you will not be able to start a new transaction on that connection. This is because the connection is dealing with the cursor and needs to complete what it's doing (i.e. get to the end of the cursor and close it) before continuing."

"...a side affect of the firehose cursor is that it only permits one active recordset per connection"

Use instead a code like (also from MSDN) to avoid the default cursortype adOpenForwardOnly and the default locktype adLockReadOnly :

   Dim cnn1 As New ADODB.Connection
   Dim rs1 As New ADODB.Recordset
   Dim rs2 As New ADODB.Recordset

   strCnn = "DSN=Springhill;uid=sa;pwd=;database=pubs"
   cnn1.Open strCnn
   rs1.Open "Select * from authors", cnn1, adOpenStatic, adLockOptimistic
   rs2.Open "Select * from publishers", cnn1, adOpenStatic,


This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.  You'll also find a link there for Experts who wish to participate in the cleanup effort of old and abandoned questions.

Thank you,
Moderator @ Experts Exchange
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now