Adds a new record to a table.

Syntax

APPEND [BLANK]

BLANK

Adds a blank record to the end of the table and makes the blank record the current record.

Description

APPEND displays the currently selected table in an auto-generated data entry form and puts the form in Append mode. This has the same effect as using the EDIT command to display the data entry form and manually choosing Add Row from the menu or toolbar. This interactive APPEND is rarely used in applications because you have no control over the appearance of the data entry form.

The APPEND BLANK command adds a blank record to the current table and positions the record pointer on the new record, but it doesn't display a window to edit the data. This is often done in an older style of dBASE programming, and is typically followed by REPLACE statements to store values into the newly-created record.

When accessing SQL tables, some database servers do not allow you to enter blank records. Also, constraints on tables created with non-null fields, including DBF7 tables, prevent entering records with fields left blank. In these cases, APPEND BLANK will fail and cause an error.

OODML

Use the Rowset objectís beginAppend(†) method. While APPEND BLANK creates a blank record first that you must delete if you decide to discard the new record, beginAppend(†) blanks the row buffer and creates a new row only if the row is modified and saved.