PreviousBtrieve API Guide (9.1 revision 1) Next

Set Directory (17)

Show this topic in Library frames

The Set Directory operation (B_SET_DIR) sets the current directory to a specified pathname.

Parameters

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

     

 
Returned
           

Prerequisites

The target logical disk drive and directory must be accessible.

Procedure
  1. Set the Operation Code to 17.
  2. Store the logical disk drive and directory path, terminated by a binary 0, in the Key Buffer. If you omit the drive name, the MicroKernel uses the default drive. If you do not specify the complete path for the directory, the MicroKernel appends the directory path specified in the Key Buffer to the current directory.
  3. For more information about path names Btrieve supports, refer to Getting Started with Pervasive.SQL.

Result

If the Set Directory operation is successful, the MicroKernel makes the directory specified in the Key Buffer the current directory.

If the Set Directory operation is unsuccessful, the MicroKernel leaves the current directory unchanged and returns a nonzero status code.

Positioning

The Set Directory operation has no effect on positioning.


Chapter contents
Publication contents

Prev topic: Reset (28)
Next topic: Set Owner (29)