All database components must be associated with a BDE session. Use the SessionName, establish this association. When you first create a database component at design time, SessionName is set to "Default", meaning that it is associated with the default session component that is referenced by the global Session variable.
Multi-threaded or reentrant BDE applications may require more than one session. If you need to use multiple sessions, add TSession components for each session. Then, associate your dataset with a session component by setting the SessionName property to a session component's SessionName property.
At runtime, you can access the session component with which the database is associated by reading the Session property. If SessionName is blank or "Default", then the Session property references the same TSession instance referenced by the global Session variable. Session enables applications to access the properties, methods, and events of a database component's parent session component without knowing the session's actual name.
For more information about BDE sessions, see Managing database sessions.
If you are using an implicit database component, the session for that database component is the one specified by the dataset's SessionName property.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|