void __fastcall TFormMain::PackParadoxTable(hDBIDb hDB, AnsiString TblName)
{
//Paradox table use a quite different way to be packed than
//DBase or Foxpro table, it use the DBiDoRestructure not the
// DBiPackTable
DBIResult rslt;
CRTblDesc TblDesc;
//filled the structure CRTbiDesc with 0
memset((void *)&TblDesc,0,sizeof(CRTblDesc));
//copy the table name and type to the structure
lstrcpy(TblDesc.szTblName,TblName.c_str());
lstrcpy(TblDesc.szTblType,szPARADOX);
//set bPack to true to specify Pack Function
TblDesc.bPack=true;
//Pack the table
rslt=DbiDoRestructure(hDB,1,&TblDesc,NULL,NULL,NULL,false);
if(rslt!=DBIERR_NONE)
Application->MessageBox("不能压缩表","压缩数据表出错",MB_ICONERROR);
}