Bde.DBTables.TSession.Active

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Active: Boolean read GetActive write SetActive default False;

C++

__property bool Active = {read=GetActive, write=SetActive, default=0};

Properties

Type Visibility Source Unit Parent
property published
Bde.DBTables.pas
Bde.DBTables.hpp
Bde.DBTables TSession

Description

Specifies whether or not a session is active.

Examine Active at runtime for the default session, Session, to determine if it is active or not. Active is false by default, meaning there are no open database connections or datasets associated with the session. If Active is true, the session is active even if there are currently no active database connections.

Set the Active property at design time or runtime for additional session components in a database application. Setting Active to true starts the session and makes it the current session. Setting Active to true triggers an OnStartup event handler for the session and initializes the NetFileDir, PrivateDir, and ConfigMode properties.

Setting Active to false (the default), closes any open datasets, and disconnects from attached database servers.

Note: An application can close the default session by setting Active to false, but this is not recommended.

See Also