TDataSetAppend (Delphi)
Description
This example appends a new record to a table or client dataset when you click 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.
Code
procedure TForm1.Button1Click(Sender: TObject);
begin
Customers.Append;
Customers.FieldValues['Field1'] := StrToInt(Edit1.text);
Customers.FieldValues['Field2'] := Edit2.text;
Customers.Post;
end;
Uses
- Data.DB.TDataSet.Append ( fr | de | ja )
- Data.DB.TDataSet.FieldValues ( fr | de | ja )
- Datasnap.DBClient.TCustomClientDataSet.Post ( fr | de | ja )
- Bde.DBTables.TBDEDataSet.Post ( fr | de | ja )
- Data.DB.TDataSet.Post ( fr | de | ja )