EPUB | CHM | PDF

TMySQLDirectQuery.Properties.Active

Top Previous Next

Specifies whether or not a dataset is open.

Syntax:

property Active : boolean;

Description:

Use Active to determine or set a dataset's connection to data in a database. When Active is False, the dataset is closed; the dataset cannot read data from the database. When Active is True, data can be read from the database.

Unlike TMySQLQuery component Active property of TMySQLDirectQuery is not published. It is for run-time usage only.

An application must set Active to False before changing other properties that affect the status of the dataset.

note Calling the Open method sets Active to True; calling the Close method sets Active to False.

If an error occurs when setting Active property to True exception is raised and property value is set to False.

See also: Close, Open, Refresh methods