TMedDataset.Active TMedDataset

property Active: Boolean ;

Description

Set Active to true to open dataset and populate it with data.

Set Active to flase to close dataset. When dataset is closed, data cannot be read or written fro/to the datase.

When you set Active to true, following happens:

·BeforeOpen event is generated

·DataSet state is set to dsBrowse.

·xHarbour table of SQL query is being opened

·AfterOpen event is generated

In case error occurs while opening dataset, its state is set to dsInactive and any table/query is being closed.

When you set Active to false, following happens:

·BeforeClose event is generated

·DataSet state is set to dsInactive.

·xHarbour table or SQL query is closed

·AfterClose event is generated

Before setting some dataset properties application must set Active to false.

Open method may be used to set Active to true and Close method can be used to set Active to false.