Pervasive logo

Prev What's New in Pervasive.SQL V8.5 Next

New Btrieve Login Operation


This release offers an entirely new Btrieve operation, Login/Logout (78). Login/Logout allows Btrieve users to login to a Btrieve database to set the security context for authorized users. The details regarding this new operation are provided below.

Database Login/Logout

The Login/Logout operation (B_LOGIN/B_LOGOUT) allows a user to specify his/her user credentials and obtain authentication and authorization tokens from the database engine. This operation also allows the user to reset his/her login credentials so that they must be entered again to gain access to the database.

Parameters


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

ü




ü

ü

Returned






Prerequisites

Login Procedure

  1. Set the Operation Code to 78.
  2. Set the key number to 0.
  3. Place the server name, database name, user ID, and password in the key buffer in the form of a database URI. (See Database URIs .)

Logout Procedure

  1. Set the Operation Code to 78.
  2. Set the key number to 1.
  3. Place the server name, database name, user ID, and password in the key buffer in the form of a database URI. (See Database URIs .)

Result

If the Login or Logout operation is successful, the database engine returns status 0; otherwise, one of the following status codes may be returned:
1
Invalid operation
172
Database name not found
3103
Unknown server

Notes

The combined length of the database URI must be less than 255 bytes. This is due to the maximum size of the key buffer.

The Login operation has a performance cost. You should not code applications to login and logout on every file. Instead, login once to a database at the beginning of a session, then logout when the database work is complete.

Positioning

The Login/Logout operation has no effect on any file currency information.


Prev
Database URIs
Contents
Up
Check for Revisions
Next
Changes to Other Btrieve Operations