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

# TDataSet.BeforeOpen

Event triggered before the dataset is opened.

## Declaration

Source position: db.pas line 1365

`public property TDataSet.BeforeOpen: TDataSetNotifyEvent read FBeforeOpen write FBeforeOpen;`

## Description

BeforeOpen is triggered before the dataset is opened. No actions have been performed yet when this event is called, and the dataset is still in dsInactive state. It can be used to set parameters and options that influence the opening process. If an exception is raised during the event handler, the dataset remains closed.

## See also

TDataset.AfterOpen |  | Event triggered after the dataset is opened.
TDataset.State |  | Current operational state of the dataset

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