JavaScript Editor js editor     Web development 

Main Page

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.

EditedTableBuffer2 graphic foxpro

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.

EditedTableBuffer graphic foxpro

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:

В Copy Code
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

  1. Use the GO | GOTO Command with a negative value to position the record pointer at the record to be deleted.

  2. Use the DELETE Command to mark the record for deletion.

  3. Use the TABLEREVERT( ) Function to remove the record from the buffer.

    The TABLEREVERT() function also affects the status of deleted and changed rows.

To remove all appended records from a table buffer

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.

See Also

JavaScript Editor js editor     Web development