Ver Mensaje Individual
  #4  
Antiguo 04-05-2007
Avatar de sitrico
[sitrico] sitrico is offline
Miembro Premium
 
Registrado: may 2003
Ubicación: Caracas, Venezuela
Posts: 295
Reputación: 24
sitrico Va por buen camino
Prueba compactar y reindexar todas las tablas (antes haz un respaldo )

te lo paso como me lo pasaron:

Código Delphi [-]
procedure PackPdoxTable(Table: TTable);
var
  TableDesc: CRTblDesc;
  WasActive: Boolean;
  hDatabase: hDbiDB;
begin
  WasActive := Table.Active;
  Screen.Cursor := crHourglass;
  try
    // open if it was closed
    // (to get the valid DBHandle)
    if not WasActive then
      Table.Open;
    // get the database handle and close the table
    hDatabase := Table.DBHandle;
    Table.Close;
    // fill the table descriptor
    FillChar (TableDesc, SizeOf (CRTblDesc), 0);
    with TableDesc do
    begin
      StrPCopy (szTblName, Table.TableName);
      StrPCopy (szTblType, szParadox);
      bPack := True;
    end;
    // restructure the table, packing it
    if hDatabase <> nil then
      Check (DBIDoRestructure (hDatabase, 1,
        @TableDesc, nil, nil, nil, False))
    else
      ShowMessage ('No se encontro el manejador de la BDD');
  finally
    Screen.Cursor := crDefault;
    // eventually reopen
    if WasActive then
      Table.Open;
  end;
end;

Si usas un campo de autoincremento también puedes hacer lo siguiente:

Modifica la estructura da la tabla y pon el campo autoinc como integer, luego compacta la tabla y al final lo vuelves a poner autoinc.
__________________
Sitrico

Última edición por sitrico fecha: 04-05-2007 a las 01:39:50.
Responder Con Cita