?
Solved

ADODB connection events.

Posted on 2003-03-28
5
Medium Priority
?
326 Views
Last Modified: 2010-04-17
VB: ADODB.connection (transaction management)
How do I find out whether a transaction has started on a ADODB connection so that I can rollback the transaction in the error handler. If I try to rollback the transaction which wasnt started, it throws me an error.
Right now I am achieving this using boolean variable.
0
Comment
Question by:ashishshinde
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 3

Accepted Solution

by:
coolsumu earned 200 total points
ID: 8229678
0
 

Expert Comment

by:raseniero
ID: 8255622
just test the state of your adodb.

try this.


dim myado as adodb.recordset

set myado = new adodb.recordset
with myado

   if .state  = 1 then .close
   .open " "

   'you may go ahead
end with


Rhian
0
 
LVL 8

Expert Comment

by:spongie
ID: 8283378
...or you can simply begin the transaction right away after you open the connection and commit it at the very end of the procedure just before closing the connection.  Also, in your error handler, make the rollback the last line just before the you close the connection.

This way, you'll know that there is always a transaction going on.  
0
 

Expert Comment

by:CleanupPing
ID: 9446683
ashishshinde:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Make the most of your online learning experience.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Starting up a Project
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question