[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'db' (#fcl)

# TDataSet.BeforeInsert

Event triggered before the dataset is put in insert mode.

## Declaration

Source position: db.pas line 1626

`public property TDataSet.BeforeInsert: TDataSetNotifyEvent read FBeforeInsert write FBeforeInsert;`

## Description

BeforeInsert is triggered at the start of the TDataset.Append or TDataset.Insert methods. The dataset is still in dsBrowse state when this event is triggered. If an exception is raised in the BeforeInsert event handler, then the dataset will remain in dsBrowse state, and the append or insert operation is cancelled.

## See also

TDataset.AfterInsert |  | Event triggered after the dataset is put in insert mode.
TDataset.Append |  | Append a new record to the data
TDataset.Insert |  | Insert a new record at the current position.

The latest version of this document can be found at lazarus-ccr.sourceforge.net .