FATS - Fast Access Tree System
Table of Contents
List of Commands
"1" Insert Single Key

"1" Insert Single Key


Command string:

CMND$ = "1\{KeyNo}\{RecNo}\{FileNo}\{KeyString}"

KeyNoKey number
RecNo Record number
FileNo File number
KeyString Key value

Purpose:

Insert additional key

Description:

With the commands Insert Record (I) and Build Record (B) for each data record are inserted exactly as many keys into the index file as were defined with the "Create Indexfile" instruction.

This command permits you an inserting of additional keys for the data record indicated over "RecNo". The record number in "RecNo" should be a valid record number.
Note the fact that these additional keys are not deleted automatically by the command  Delete Record (D). They have to be removed with the command  Delete Single Key (2).

This command is meant as supplement of the commands Insert Record (I) and Build Record (B) and is not to replace these.
Although the presence of the transferred record number ("RecNo") is not checked, the command  Search (S) supplies the errorcode 16 if "Insert Record" or "Build Record" were not used yet.

Parameters returned:

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

Example:

CMND$ = "1\1\"+STR$(RECNO)+"\1\"+KEYSTRING$

See also:

 "I" Insert Record; page 4-38
 "B" Build Record; page 4-14
 "2" Delete Single Key; page 4-8


 

© 2008  GCS Software, Udo Gertz