RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomClientDataSet.Post Method

Writes a modified record to the Data property or the change log.

Pascal
procedure Post; override;
C++
virtual __fastcall Post();

Call Post to commit changes to the current record. Methods that change the dataset state, such as Edit, Insert, or Append, or that move from one record to another, such as First, Last, Next, and Prior automatically call Post.

Note: If the LogChanges property is true, Post updates the change log specified by the Delta property. If LogChanges is false, Post writes the changes directly to the Data property.
 

Delphi Examples: 

 

{
This example appends a new record to a table or client
dataset when the user clicks a button. The two fields
Field1 and Field2 are filled from the contents of two edit
controls.  This example requires a populated TTable or
TDataSet with the appropriate field values.
} 
procedure TForm1.Button1Click(Sender: TObject);
begin
  Customers.Append;
  Customers.FieldValues['Field1'] := StrToInt(Edit1.text);
  Customers.FieldValues['Field2'] := Edit2.text;
  Customers.Post;
end;

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!