You can append and delete records while table buffering is enabled: appended records are added to the end of the buffer. To access all records in the buffer, including appended records, use the RECNO( ) Function. The RECNO(В ) function returns sequential negative numbers on records you append to a table buffer. For instance, if you initiate table buffering, edit records 7, 8, and 9, and then append three records, the buffer will contain RECNO(В ) values of 7, 8, 9, вЂ“ 1, вЂ“ 2, and вЂ“ 3.
|Tables containing automatically incrementing field values append table-buffered records approximately 35% slower than tables without automatically incrementing field values, which might affect performance. When using table buffering, the table header is locked when the record is appended.|
You can remove appended records from the buffer only by using the TABLEREVERT( ) Function. For any appended record, both TABLEUPDATE(В ) and TABLEREVERT(В ) delete the negative RECNO(В ) value for that record while maintaining the sequence.
While using a table buffer, you can use the GO command with the negative RECNO(В ) value to access a specific appended record. For instance, using the previous example, you can type:
GO 7 && moves to the 1st buffered record GO -3 && moves to the 6th buffered record (3rd appended)
To append records to a table buffer
Use the APPEND or APPEND BLANK command after you enable table buffering.
Appended records have sequential ascending negative RECNO(В ) numbers.
To remove an appended record from a table buffer
Use the GO | GOTO Command with a negative value to position the record pointer at the record to be deleted.
Use the DELETE Command to mark the record for deletion.
Use the TABLEREVERT( ) Function to remove the record from the buffer.
Note: The TABLEREVERT() function also affects the status of deleted and changed rows.
To remove all appended records from a table buffer
Use the TABLEREVERT( ) Function with a value of true (.T.).
TABLEREVERT(В ) removes appended records from a table buffer without writing the records to the table. TABLEUPDATE(В ) writes all current buffered records to a table, even if they've been marked for deletion.