PreviousBtrieve API Guide (9.1 revision 1) Next

End Transaction (20)

Show this topic in Library frames

The End Transaction operation (B_END_TRAN) completes a transaction and makes the appropriate changes to the data files. It also unlocks all files and records locked by the transaction.

Parameters

 
Op Code
Pos Block
Data Buf
Data Buf Len
Key Buffer
Key Number
Sent

         
Returned
           

Prerequisites

Before issuing an End Transaction operation, your application must issue a successful Begin Transaction operation (19 or 1019).

Procedure

Set the Operation Code to 20. While the MicroKernel ignores all other parameters on an End Transaction call, you should initialize them to 0 to ensure compatibility with future releases.

Result

If the End Transaction operation is successful, all the operations within the transaction are recorded in your file. Your application cannot abort a transaction after an End Transaction operation.

If the End Transaction operation is unsuccessful, the MicroKernel returns the following status code:

38

The MicroKernel encountered a transaction control file I/O error.

Positioning

The End Transaction operation has no effect on any file currency information.


Chapter contents
Publication contents

Prev topic: Drop Index (32)
Next topic: Find Percentage (45)