Board index » delphi » help...about ClearFields

help...about ClearFields

hi.....I have a question about ClearFields
If I want to clear the data of table1,I can use the 'delete' to erase the
local record(at Cursor).
but it is just once and once to delete the records
if I want to clear all the content of table1....how can I do?
I find the 'Dataset.ClearFields'....but I don't know how to use it?

procedure TForm1.ButtondeleteClick(Sender: TObject);
begin
  with table1 do

    begin
      edit;

      dataset.clearfields;//==>I don't know how to use it?

      post;
    end;

end;

 

Re:help...about ClearFields


Quote
On Tue, 25 Sep 2001 14:34:16 +0800, "alvin" <alvin_...@msn.com> wrote:
>if I want to clear all the content of table1....how can I do?

This is better...

with Table1 do
begin
  Active := False;
  DatabaseName := 'optional';
  TableName := 'CustInfo';
  TableType := ttParadox;
  EmptyTable;
end;

Other Threads