Board index » delphi » DBASE: permanently deleting deleted records

DBASE: permanently deleting deleted records

Hi,

Can anyone write me, how can I delete physically the deleted records
from
a dbf file? If I know well, it's only marked with an * (asterisk), and
is not visible for the next operations. Is there any solution?
Thanks
 Akos
ha...@sunserv.kfki.hu

 

Re:DBASE: permanently deleting deleted records


Quote
Akos Horvath wrote:

> Hi,

> Can anyone write me, how can I delete physically the deleted records
> from
> a dbf file? If I know well, it's only marked with an * (asterisk), and
> is not visible for the next operations. Is there any solution?
> Thanks
>  Akos
> ha...@sunserv.kfki.hu

The only way is packing the table.

Re:DBASE: permanently deleting deleted records


Quote
_VBK_ <_V...@nowhere.pt> wrote:
>Akos Horvath wrote:

>> Hi,

>> Can anyone write me, how can I delete physically the deleted records
>> from
>> a dbf file? If I know well, it's only marked with an * (asterisk), and
>> is not visible for the next operations. Is there any solution?
>> Thanks
>>  Akos
>> ha...@sunserv.kfki.hu
>The only way is packing the table.

And this is the way to do it (only with dBase tables!!)

    try
      { Pack Table }
      Check(DbiPackTable(Table1.DBHandle,Table1.Handle,
          NIL,szDBASE,TRUE));
    finally
      Table1.CursorPosChanged;
      Table1.Refresh;
    end;

Remember to put the DB unit in the uses-clause..

Regards,
Eric

Other Threads