FATS - Fast Access Tree System
Table of Contents
List of Commands
"DL" Manipulate Deleted List

"DL" Manipulate Deleted List


Command string:

CMND$ = "DL\{RecNo}\{GetSetFlag}\{FileNo}"

RecNo Record number
GetSetFlagPossible values:
GRemove a record number from the list of deleted records. If there are no entries in the list this command will return the number of the next available record in the data file. If there are entries in the list, the record number of the last deleted record will be returned.

This command is automatically called by FATS when the  Insert Record (I) command is used.

SAdd a record number ("RecNo") to the list of deleted records.

This command is automatically called by FATS when the  Delete Record (D) command is used.

FileNo File number

Purpose:

Manipulate the list of deleted records.

Description:

The record numbers of deleted data records are taken up by FATS automatically with the command  Delete Record (D) to a list of the data records that already have been deleted, so that the command  Insert Record (I) can possibly reuse these, before the data file must be extended. This list is administered according to the principle last in, first out, i.e. the record deleted last is reused as next.

This command allows you to manipulate this list by inserting and deleting of record numbers. Because free space in the data and index files is reclaimed and reused by FATS automatically as records are deleted and added, this command is normally not needed, but it can be useful for reindexing data files containing deleted records.

Note that using this command in conjunction with the commands "Insert Record" and "Delete Record" can result in corrupted data files, incorrect query results, and program failures.

Parameters returned:

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

Example:

CMND$ = "DL\"+STR$(RECNO)+"\S\1\"

 BASIC Example
 Pascal Example
 C Example

See also:

 "Q" Get Next Record #; page 4-77
 "D" Delete Record; page 4-21


 

© 2008  GCS Software, Udo Gertz