PreviousBtrieve API Guide (v10) Next

Reset (28)

Chapter contents

The Reset operation (B_RESET) releases all resources held by a client. This operation aborts any transactions the client has pending, releases all locks, and closes all open files for the client.

Parameters

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

     

Returned
           

Prerequisites

Your application can issue a Reset operation at any time after the transactional interface or Requester is loaded, as long as the client issuing the Reset call has established a connection with the transactional interface-for example, by opening a file or by requesting the status of a file using a Pervasive PSQL utility.

Procedure

  1. Set the Operation Code to 28.
  2. Set the Key Number and Key Buffer to 0.

Result

If the Reset operation is successful, the transactional interface performs the following actions for the specified client, window, or session:

  1. Aborts any active transactions.
  2. Releases all locks held.
  3. Closes all open files.

If the Reset operation is unsuccessful, the transactional interface returns a nonzero status code.

Positioning

The Reset operation destroys all currencies because it closes any open files.


Chapter contents
Book contents

Prev topic: Open (0)
Next topic: Set Directory (17)