来自:tom12345, 时间:2001-7-28 16:23:00, ID:591817
首先,在uses中加入 DbiTypes,DbiProcs,DbiErrs;
将最后删除的记录恢复:
DbiSetProp(hDBIObj(table1.handle), curSOFTDELETEON,1);
table1.first;
for i:=1 to Table1.RecordCount do
begin
table1.UpdateCursorPos;
DbiUndeleteRecord(table1.handle);
table1.next;
end;
table1.first;
DbiSetProp(hDBIObj(table1.handle), curSOFTDELETEON,0);
彻底删除记录:
Table1.Exclusive:=True;
DbiPackTable(table1.dbHandle, table1.handle, NIL, NIL, true);