Discussion Locked

Roll Back Options

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am currently developing a financial application in VB. The ADO control is used to access data from an MS SQL Server database. I use the TABLE.Save command to save any table prior to updating the the table; and restore this saved information to the table in case of error. This method has proven to be inefficient because any power failure will result in some tables being updated and others left out. This is very dangerous in a financial environment.
Is there any method of Roll Back used in ADO that will allow the tables to be updated only when Commitrans is called?

5 replies

by glen_mcleod

Look into the ADO Connection object's BeginTrans, CommitTrans and Rollback methods.

You can begin a transaction, add, change and/or delete data, then either commit the whole thing or roll it all back. A hardware failure happening before the Commit is issued would be treated as a rollback.

Glen

This discussion is closed to new replies.