Clear

See Also: Understanding File Buffers and DDO Field Buffers, Constrained_Clear, Find, Save, Saverecord

Purpose

To erase all data from the record buffers of one or more database tables. The status of the tables is set inactive. The DataDictionary class provides superior functionality that replaces the need for this command.

Syntax

Clear {DF_ALL | table} […{table}]

Where {table} is the name or filelist number of one or more database tables. The table must be open.

What It Does

Clear deactivates the record buffer for {table}, sets all string fields to blanks, all numeric and date fields to zero, and the record number to zero.

The DF_ALL parameter clears all record buffers of all open tables.

Example

Clear vendor customer employee

This clears the record buffer for the vendor, customer, and employee database tables. Assuming these tables are number 1, 4, and 6 in the table list, the following command would be equivalent:

Clear 1 4 6

Notes

 

Move 0 To df_table.recnum