Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Trucos (https://www.clubdelphi.com/foros/forumdisplay.php?f=52)
-   -   Borrar físicamente registros en DBF (https://www.clubdelphi.com/foros/showthread.php?t=80717)

dec 01-07-2006 02:34:18

Borrar físicamente registros en DBF
 
¿Cómo puedo borrar físicamente en dbf's los registros marcados?

(La estructura básica pertene a I. Marteens)

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
begin
  PackDbf('tu_alias','tu_tabla.dbf');
end;

Procedure PackDbf(const ADatabase,Atable:String);
begin
  With TTable.Create(nil) do
    try
      DatabaseName:=ADatabase;
      TableName:=ATable;
      Exclusive:=True;
      Open;
      Check(DbiPackTable(Database.Handle,Handle,'','',True));
    finally
      Free;
  end;
end;


La franja horaria es GMT +2. Ahora son las 13:48:16.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi