Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_tcommit() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_TCOMMIT()


Returns

A numeric transaction ID number (TID).


Description

Ends an explicit transaction and Returns an ID number for the 
transaction, much as FOPEN() opens a file and Returns a file handle. 
The transaction ID can be used with N_TSTATUS() to determine if the 
file server has finished processing the transaction.

The function will issue a Clipper COMMIT if one has not already been 
issued.

You do not need to wait for one transaction to finish before beginning 
another, nor do you need to monitor a transaction's progress. Your 
program can begin another transaction while the server is still 
processing an earlier transaction in the background.


Example

USE Custfile EXCLUSIVE
N_TBEGIN()                  // Begin a transaction
.
.                           // Do stuff
.
nTranID = N_TCOMMIT()       // End transaction & get ID
DO WHILE 'A' $ N_TSTATUS(nTranID)
                            // Wait for server to finish
ENDDO
CLOSE



See Also: N_TSTATUS()

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