Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RaSQL/B 6.1a for Clipper - <b>n_xtrancan()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_XTRANCAN()
Cancel (rollback) transaction

Syntax
N_XTRANCAN()

Returns
True if successful.

Remarks
Directs the server to rollback all pending updates for the current 
transaction.   A pending update is any  update made since the most recent 
N_XTRANON().

This is an inelegant and ungraceful way to back out of a transaction. Use it 
only in an emergency.

A better method is to lock all records you plan to update before updating 
any of them.  This will ensure that the transaction will complete 
successfully.

Example
* Start transaction
N_XTRANON()
IF <transaction completed ok>
  * End transaction
  N_XTRANOFF()
ELSE
  * Roll back transaction
  N_XTRANCAN()
ENDIF


See Also: N_XTRANOFF() N_XTRANON()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson