APPEND BLANK
Add a new record to the current database file
Syntax
APPEND BLANK
Description
APPEND BLANK is a database command that adds a new record to the end of the current database file and then makes it the current record. The new field values are initialized to the empty values for each data type: character fields are assigned with spaces; numeric fields are assigned zero; logical fields are assigned false (.F.); date fields are assigned CTOD(“”); and memo fields are left empty.
If operating under a network with the current database file shared, APPEND BLANK attempts to add and then lock a new record. If another user has locked the database file with FLOCK() or locked LASTREC() + 1 with RLOCK(), NETERR() returns true (.T.). Note that a newly APPENDed record remains locked until you lock another record or perform an UNLOCK. APPEND BLANK does not release an FLOCK() set by the current user.
Examples
. This example attempts to add a record to a shared database file and uses NETERR() to test whether the operation succeeded: USE Sales SHARED NEW . . <statements> . APPEND BLANK IF !NETERR() <update empty record>... ELSE ? "Append operation failed" BREAK ENDIF
Seealso
APPEND FROM, FLOCK(), NETERR(), RLOCK()