ADO Database Delphi

Bu islem icin DbiPackTable. Isimli BDE fonksiyonu kullanilir.
Örnek kod su sekildedir.
uses
DbiProcs, DbiTypes, DBConsts;
procedure TForm1.Button1Click(Sender: TObject);
var
Error: DbiResult;
ErrorMsg: String;
Special: DBIMSG;
begin
table1.Active := False;
try
Table1.Exclusive := True;
Table1.Active := True;
Error := DbiPackTable(Table1.DBHandle, Table1.Handle, nil, szdBASE, True);
Table1.Active := False;
Table1.Exclusive := False;
finally
Table1.Active := True;
end;
case Error of
DBIERR_NONE:
ErrorMsg := 'Tamam';
DBIERR_INVALIDPARAM:
ErrorMsg := 'Tablo belirsiz' +
'name is NULL';
DBIERR_INVALIDHNDL:
ErrorMsg := 'Veri tabani belirsiz';
DBIERR_NOSUCHTABLE:
ErrorMsg := 'Tablo adi belirsiz';
DBIERR_UNKNOWNTBLTYPE:
ErrorMsg := 'Tablo tipi belirsiz';
DBIERR_NEEDEXCLACCESS:
ErrorMsg := 'Tablo exclusive modda degil';
else
DbiGetErrorString(Error, Special);
ErrorMsg := '[' + IntToStr(Error) + ']: ' + Special;
end;
MessageDlg(ErrorMsg, mtWarning, [mbOk], 0);
end;