FATS - Fast Access Tree System
Table of Contents
List of Commands
"BK" Build Keys

"BK" Build Keys


Command string:

CMND$ = "BK\{RecNo}\{FileNo}\{KeyString1}[\{KeyString2}]"

RecNo Record number
FileNo File number
KeyString#Key value
[ ]Optional

Purpose:

Insert primary keys.

Description:

This command corresponds to the command  Insert Keys (IK) except that FATS does not perform writes to the operation system until its cache is full and the least-recently-used algorithm controlling the I/O buffer cache selects a buffer for reuse. FATS never writes to the index file unless the cache buffers are entirely filled during the operation.
All other FATS commands will update the index file before returning to the calling program (if this feature had not been disabled with the Auto Refresh command).

When using this command, you cannot assume that any of your updates have been written to the disk until you either perform a close operation or execute the command  Write Page Map (W).
In the network environment you should open the file in exclusive open mode before you operate with this instruction (see  Auto Refresh (Y); page 4-77).

Parameters returned:

ERRORCODE:Errorcode or 0 (no error)
RECNO:Record number
FATSKEY:Undefined

Example:

CMND$ = "BK\"+STR$(RECNO)+"\1\"+KEY1$+"\"+KEY2$

 BASIC Example
 Pascal Example
 C Example

See also:

 "IK" Insert Keys; page 4-40
 "Y" Auto Refresh; page 4-77


 

© 2008  GCS Software, Udo Gertz