[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Insert a new record at the current position.
Source position: db.pas line 1647
public procedure TDataSet.Insert; |
Insert will insert a new record at the current position. When this function is called, any pending modifications (when the dataset already is in insert or edit mode) will be posted. After that, the BeforeInsert, BeforeScroll, OnNewRecord, AfterInsert and AfterScroll events are triggered in the order indicated here. The dataset is in the dsInsert state after this method is called, and the contents of the various fields can be set. To write the new record to the underlying database TDataset.Post must be called.
If the dataset is read-only, calling Insert will result in an EDatabaseError.
|
Event triggered before the dataset is put in insert mode. |
|
|
Event triggered before the cursor changes position. |
|
|
Event triggered when a new record is created. |
|
|
Event triggered after the dataset is put in insert mode. |
|
|
Event triggered after the cursor has changed position. |
|
|
Post pending edits to the database. |
|
|
Append a new record to the data |