DELETE


The DELETE statement is used to delete a record from a jBASE file.

 

COMMAND SYNTAX

DELETE {variable,} expression {SETTING setvar} {ON ERROR statements}

 

SYNTAX ELEMENTS

If specified, variable should have been the subject of a previous OPEN statement. If variable is omitted then the default file variable is assumed.

The expression should evaluate to the name of a record stored in the open file.

If the SETTING clause is specified and the delete fails, setvar will be set to one of the following values:

Incremental File Errors

128 No such file or directory
4096 Network error
24576 Permission denied
32768 Physical I/O error or unknown error

 

NOTES

The statement will have no effect if the record name does not exist within the file.

If a lock was being held by the program against the file record, then the lock will be released.

 

EXAMPLES

OPEN "DAT1" TO DatFile1 ELSE ABORT 201, "DAT1"
DELETE DatFile1, "record1"

will delete the record "record1" from the file DAT1.


jBC