|
The Get Last operation (B_GET_LAST) retrieves the logical last record based on the specified key. If duplicates exist for the last key value, the record returned is the last duplicate. You can use the Get Key (+50) bias to detect the presence of a value in a file. A Get Key operation is generally faster.
If the Get Last operation is successful, the MicroKernel returns the requested record in the Data Buffer, stores the corresponding key value in the Key Buffer, and returns the length of the record in the Data Buffer Length parameter.
If the Get Last operation is unsuccessful, the MicroKernel returns one of the following status codes:
|
3
|
The file is not open. |
|
6
|
The key number parameter is invalid. |
|
9
|
The operation encountered the end-of-file. |
|
22
|
The data buffer parameter is too short. |
The Get Last operation establishes the complete logical and physical currencies and makes the retrieved record the current one. The logical next position points beyond the end of the file.
|
Chapter contents
Prev topic: Get Key (+50)
|