Skip to content

TDataSet.AppendRecord

Append a new record to the dataset and fill with data.

Declaration

Source position: db.pas line 2048

public 
procedure TDataSet.AppendRecord(const Values: Array of const);

Description

AppendRecord first calls Append to add a new record to the dataset. It then copies the values in Values to the various fields (using TDataset.SetFields) and attempts to post the record using TDataset.Post. If all went well, the result is that the values in Values have been added as a new record to the dataset.

Errors

Various errors may occur (not supplying a value for all required fields, invalid values) and may cause an exception. This may leave the dataset in editing mode.

See also

Name Description
TDataset.Append Append a new record to the data.
TDataset.SetFields Set a number of field values at once.
TDataset.Post Post pending edits to the database.