Board index » delphi » How to pack a db4 table from delphi v3

How to pack a db4 table from delphi v3

How do we pack and/or reindex dbase4 tables from delphi v3 ?

If we have to call functions in idapi32, is there a pas declaration file
for them ?

Thanks

 

Re:How to pack a db4 table from delphi v3


It's quite simple:
 DbiPackTable( YourTable.DBHandle, YourTable.Handle, Nil, Nil, True) ;

It's in de BDE unit, I believe.
Oh, make shure the table is opened in exclusive mode!!

Full code should read something like this:

With YourTable do
 Try
     Close;
    Exclusive:=True;
    Open;
    DbiPackTable(DbHandle,Handle,Nil,Nil,True);
  Except
    On E:EDatabaseError Do
        ShowMessage(E.message);  // Or something more eloquent than this, of
course
    else raise;
  end;

Quote
Staff wrote in message ...

>How do we pack and/or reindex dbase4 tables from delphi v3 ?

Re:How to pack a db4 table from delphi v3


Look in the BDE directory for the bde32.hlp file and search for the
functions DbiPackTable and DbiRegenIndex.

Eduardo Kives

Re:How to pack a db4 table from delphi v3


Take a look at the BDE 32 help file that comes with Delphi, there are
functions for doing what you want.

Staff escreveu na mensagem ...

Quote

>How do we pack and/or reindex dbase4 tables from delphi v3 ?

>If we have to call functions in idapi32, is there a pas declaration
file
>for them ?

>Thanks

Other Threads