Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
It is my understanding and correct me if I'm not correct that rollback only rollback any updating you have done within the begin transaction end transaction. Say for instance you have two table called subscriber and money. Before you begin the transaction you append a record to the subscriber and money table. The subscriber table has a stored procedure that requires that you enter a last name. User hasn't done that so when begin the begin end transaction with a tableupdate to subscriber table it fails. You call rollback but it doesn't rollback since you haven't included the append in the begin end transaction sequence. So what I do is call rollback and then call tablerevert for each of the tables. From my limited knowledge I tried to keep the updating outside of the begin end transaction since I knew it lock the entire table and want to keep the processing short within the begin end transaction. Perhaps I was wrong and should have included my appends within the transaction.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement