RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSession.Active Property

Specifies whether or not a session is active.

Pascal
property Active: Boolean;
C++
__property Boolean 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.
 

 

ConfigMode 

NetFileDir 

PrivateDir 

Close 

Open 

Activating a Session 

Debugging dbExpress Applications using TSQLMonitor

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!