Board index » delphi » Pack Tables

Pack Tables

How would I pack a paradox table from code in D4?

Thanks Mike

 

Re:Pack Tables


Paradox tables do not generally need to be packed but if you want to use the
following.

function dgPackParadoxTable(Tbl: TTable; Db: TDatabase):DBIResult;
{Packs a Paradox table by calling the BDE
 DbiDoRestruct function. The TTable passed as the
 first parameter must be closed.  The TDatabase passed
 as the second parameter must be connected.}
var
  TblDesc: CRTblDesc;
begin
  Result := DBIERR_NA;
  FillChar(TblDesc, SizeOf(CRTblDesc), 0);
  StrPCopy(TblDesc.szTblName, Tbl.TableName);
  TblDesc.bPack := True;
  Result := DbiDoRestructure(Db.Handle, 1, @TblDesc, nil, nil, nil, False);
end;

--
Bill

Bill Todd (TeamB)
(TeamB cannot respond to questions received via email)

Re:Pack Tables


Hi, Mike.

Look at BDE32.HLP, that have and good example.

Regard.
--
Petio Tonev
pto...@iname.com
www.i.am/ptonev , www.w3.to/tonevsoft

Other Threads