INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Rollback for databases that don't support transactions

Rollback for databases that don't support transactions

(OP)
Hi all,

This may be uncommon, but I'm working with a database (Powerflex) who's ODBC driver doesn't support transactions. So if an error occurs during a set of UPDATE, INSERT and DELETE SQL commands, I'm left in limbo.

Originally, I'd hand write an SQL statement that was the reverse of the one I just executed, store it in a TStringList, catch the exception, and then play out those reverse statements. Crude, but it worked. And it doubled the amount of SQL I'd have to write, plus encouraged sync errors between the statement pairs.

So, embarking on a new project with lots of SQL throughout, I thought I'd be smart about it and write TAutoRollback, which executes the original SQL statement I give it, but before it does parses through it and automagically generates the reverse statement. It's a fair bit of crunching but I'm getting there. And it's only now 60% done that I think that perhaps all this work has been done before by smarter people.

Does anyone know of a rollback component that can automatically reverse SQL commands?

RE: Rollback for databases that don't support transactions

(OP)
Hi Aaron,

I'm actually using the Connx powerflex ODBC (8.9) driver. I've had a look at the documentation for their latest version (10.5) and unforunately it still doesn't support transactions for powerflex. (http://www.connx.com/products/connx/Connx%2010.5%20UserGuide/connxcdd32c/powerflex.htm). The datasheet for powerflex also fails to mention 'transaction' anywhere. Their ODBC driver supports a few other types of DB systems, and it does support transactions for those.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close