The number of records that were undeleted.
Optional. Default = first deleted record of table. The number of the first deleted record to be undeleted.
Optional. Default = last deleted record of table. The number of the last deleted record to be undeleted.
Optional. Default = .F. (FALSE). Specifies whether to mark undeleted records.
- .T. = mark undeleted records
- .F. = do not mark undeleted records
Un-delete records in a table
The <TBL>.UNDELETE() method undeletes a range of records in a table. The operation is performed on the records in the table pointed to by the object pointer, <TBL>. If Starting_Record and Ending_Record are not supplied, then Alpha Anywhere undeletes all of the records in the table. Note : Records can only be undeleted before the table has been packed.
Type the following in the Interactive window.
t = table.open("Customer") t.records_get()-> 60 'delete all records t.delete_range(".T.") t.records_get()-> 0 'Undelete records 10 through 20 t.undelete(10,20) t.records_get()-> 11 'Undelete all records t.undelete() t.records_get()-> 60 'undelete all records, and mark those that are undeleted '(assume that 99999999 will be more that total records in table) t.undelete(1,99999999,.T.)