Ver Mensaje Individual
  #2  
Antiguo 29-06-2006
Avatar de AGAG4
AGAG4 AGAG4 is offline
Miembro
 
Registrado: ago 2004
Ubicación: Los Mochis, Sinaloa, México
Posts: 1.420
Reputación: 21
AGAG4 Va por buen camino
Checa esto....

Prueba este código:
Código Delphi [-]
uses
  DBTables;
....
procedure PackTable(Table : TTable; ReCreateIndexes : Boolean);
begin
  if not (Table.Active and Table.Exclusive) then
    raise EDatabaseError.Create('Tabla Se encuentra Abierta y en Modo Exclusivo....');
  Check(DbiPackTable(Table.DataBase.Handle, Table.Handle,Nil, Nil, ReCreateIndexes));
end;

function Reindexar(Table : TTable):Boolean;
begin
  try
    result:=true;
    Table.Active := False;
    Table.Exclusive := True;
    Table.Active := True;
    PackTable(Table,True);
  except
    result:=false;
  end;
end;

Suerte!!!!
Responder Con Cita