Icon AutoSessionName Property

property AutoSessionName: Boolean

Usage

Use the AutoSessionName property to specify whether or not a unique session name is automatically generated for the TEDBSession component. AutoSessionName is intended to guarantee developers of multi-threaded applications that TEDBSession components created for each thread are assigned unique names at runtime.

When AutoSessionName is False (the default), the application must set the SessionName property for a session component to a unique name within the context of the application. When AutoSessionName is True, the TEDBSession component assigns the SessionName property automatically and replicates this session name across the SessionName properties of all TEDBDatabase, TEDBQuery, TEDBTable, and TEDBStoredProc components in the data module or form where the session component is created. This allows applications to use TEDBSession components in data modules that are replicated over multiple threads without having to worry about providing unique names for each session when the data module is created. The TEDBSession component constructs a session name by taking the current value of the Name property and appending an underscore (_) followed by a numeric value. For example, if the Name property was set to "CustomerSession", then the AutoSessionName property would be set to "CustomerSession_2" for the second session created.

Information The following restrictions apply to the AutoSessionName property:

   • You cannot set the AutoSessionName property to True for a TEDBSession component in a data module or form that contains more than one TEDBSession component.

   • You cannot add a TEDBSession component to a data module or form that already contains a TEDBSession component with its AutoSessionName property set to True.

   • You cannot directly set the SessionName property of a TEDBSession component when its AutoSessionName property is True.
Image