View the deleted records of a table  

Send By: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Date: 27/09/99

Tip accessed 565 times

 


When we erase a record, in fact, the BDE doesn't make it disappear of the table, but rather it marks it as erased. To see these registrations in equal manner of rest, we can use this function:

Add 'DBIPROCS' and 'DBITYPES' in the uses of your form


 procedure VerBorrados(Tabla: TTable; SioNo: Boolean);
 begin
   Tabla.DisableControls;
   try
     Check(DbiSetProp(hDBIObj(Tabla.Handle), curSOFTDELETEON,
       LongInt(SioNo)));
   finally
     Tabla.EnableControls;
   end;
   Tabla.Refresh;
 end;



A call Example:



To view the deleted records:


     VerBorrados(Table1, TRUE);



For not seeing them:


     VerBorrados(Table1, FALSE);



This function works for dBase tables. For the rest of tables... you will tell it to us...