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_xtranoff()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_XTRANOFF()
Stop transaction

Syntax
N_XTRANOFF()

Returns
True if successful.

Remarks
N_XTRANON() begins a transaction, while N_XTRANOFF() ends a transaction. If 
the station or server abends prior to the end of the transaction,  Btrieve 
will roll back all updates performed during the transaction.

In general, you should begin a transaction after you have locked all 
necessary records but before you start any updates. End a transaction after 
you have committed all updates  to disk with  N_XUPDATE() and/or 
N_XINSERT().  

If using the RDD, end the transaction after all updates have been written to 
disk with COMMIT.  Unlock records after the end of the transaction.

Example
N_XTRANON()      && Start transaction
DO WHILE .NOT. N_XRLOCK() && Lock records
ENDDO
N_XREPLACE(...)

N_XUPDATE()      && Flush buffers
N_XTRANOFF()     && End transaction
N_XUNLOCK()      && Unlock record


See Also: N_XTRANCAN() N_XTRANON()

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