Abort Abort the current transaction in progress. Short Name TRANABT() Type Low-level function Declaration COUNT Abort() Description Abort() aborts the current transaction. All file update actions since the last Begin() will not be committed. All known locks are released, and the transaction ends. Return
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Example COUNT savepoint;
Begin(ctENABLE|ctTRNLOG); /* start transaction with locks */ while(another()); { /* get next record to add */
savepoint = SetSavePoint(); /* get save point at beginning of each master record */ if (add_master() < 0) Abort(); /* abort if can't add master rec */ dodetail(); /* process detail records */ } if (Commit(ctFREE)0) printf("\nError %d in transaction",uerr_cod);
return; }
while(moredetail()); { /*get next detail record to add */
if (add_detail()<0) { /* add details, if possible */
RestoreSavePoint(savepoint) /* with error, return to savept */ return; } } } See also AbortXtd(), Begin(), ClearSavePoint(), Commit(), RestoreSavePoint(), SetSavePoint(), TRANRDY() |
||||||||||||