Delete

Command group Flag affected Reversible Execute on client Platform(s)
Changing data YES NO NO All

Syntax

Delete

Description

This command deletes the current record in the main file without prompting the user to confirm the command, so you should use it with caution. The flag is set if the record is deleted, or cleared if there is no main file record. The flag is also cleared if the Do not wait for semaphores option is on and the record is locked.

Example

; The following example deletes records selected by a search class.
Set main file {fAccounts}
Set search name sOverDrawn
Find first on fAccounts.Code (Use search)
Repeat
  Delete
  Next
Until flag false
; This example checks the semaphore and tells the user if the record is locked:
Do not wait for semaphores
Delete
If flag false
  OK message (Sound bell) {Record in use and can't be deleted}
End If