TIB_Session Object
Properties Methods Events

Unit
IB_Components

Declaration
TIB_Session = class(TIB_SessionBase)

Description
This class serves as a critical foundation for IB Objects components. If you are not doing anything with multi-threading then this component will not be necessary to use since the system provides a default session for the main thread automatically.

This component can be used on a data module to cause all data access components on it to be included in an isolated session. This is ideal for working with an ISAPI web module that will have a web-module instance cached and used in a multi-threading environment. When doing this make sure that it is the first in the module's creation order and that only one be placed on a module.

It is possible to override the default component with an alternate component session if you should need to have two threads access the same session. This should really only be necessary when binding to DLL's that contain IB Objects components that should act as though they were part of the main process.

See the various properties and methods for more information.

Introduced Public Properties
AllowDefaultConnection  This property determines whether or not IBO will permit the default connection for the session to be automatically assigned to a statement or dataset that did not have its IB_Connection property explicitly assigned.
AllowDefaultTransaction  This property determines whether or not IBO will permit a default internal transaction to be automatically assigned to a statement or dataset that did not have its IB_Transaction property explicitly assigned.
BrowsingColor  This is the color that will show when the control is attached to a dataset that is browsing a record.
BusyCursor  Determines the cursor that will appear on the screen when a process is active and there is no Yield indication.
BusyLevel  Indicates the nested level of processes pending cancellation or completion.
DefaultConnection  If a statement or dataset or other connection dependant component does not have an IB_Connection or IB_Database component assigned then it will attempt to reference this DefaultConnection upon demand.
DeletingColor  If ColorScheme is set to true for any IB_Dataset component then this color will be used by all data aware controls that reference this dataset when the dataset goes into dssDeleting state.
EditingColor  If ColorScheme is set to true for any IB_Dataset component then this color will be used by all data aware controls that reference this dataset when the dataset goes into dssEditing state.
FocusedConnection  Each session has a global focusing system where data aware controls announce to the session when they become focused.
FocusedDataset  Each session has a global focusing system where data aware controls announce to the session when they become focused.
FocusedDataSource  Each session has a global focusing system where data aware controls announce to the session when they become focused.
FocusedTransaction  Each session has a global focusing system where data aware controls announce to the session when they become focused.
InsertingColor  If ColorScheme is set to true for any IB_Dataset component then this color will be used by all data aware controls that reference this dataset when the dataset goes into dssInserting state.
InvalidColor  When a control is not attached to a datasource/dataset this is the color that the control will show as.
IsBusy  Indicates if the IB_Session is currently in a process.
IsYielding  Indicates if the IB_Session is currently in a process that is yielding.
LockCursorLevel  Level to which the cursor has been locked.
OnError  Global event to trap all potential exception due to an error code being returned from the API.
PreparedColor  When a control is not attached to a prepared dataset this is the color that the control will show as.
ReadOnlyColor  If ColorScheme is set to true for any IB_Dataset component then this color will be used by all data aware controls that reference this dataset when the dataset goes into a state above dssBrowse state and the control is a ReadOnly control.
SearchingColor  If ColorScheme is set to true for any IB_Dataset component then this color will be used by all data aware controls that reference this dataset when the dataset goes into dssSearching state.
SelectedColor  When multi-selecting rows in a grid this is the color used for the selected rows.
StoreActive  This property determines whether or not the following properties are stored in the DFM of the forms and datamodules.
TimerInterval  This property controls the frequency that the session generates events to the components (transactions only for now).
TimerIsBusy  This property tells whether or not the session is currently processing a timer notification.
UseCursor  Determines if the Screen.Cursor should be adjusted when a process becomes active.
YieldCursor  Determines the cursor that will appear on the screen when a process is active and there is a Yield indication.
YieldLevel  Indicates the nested level of processes pending cancellation or completion that have been started since the first call to BeginBusy() was made with Yield as true.

Introduced Public Methods
AnnounceConnection
AnnounceDataSource
AnnounceTransaction
BeginLockCursor   Used to temporarily disable the cursor twiddling.
Create
DefaultSession   This class function is used to return which TIB_Session is being used for the current thread or process.
Destroy
DoHandleError
EndLockCursor   Used to temporarily disable the cursor twiddling.
GetConnectionByName   This method will return a reference to a TIB_Connection compoent based on its DataBaseName property.
SetAlternateSession   This class method is used to make two processes share a common default component session.

Introduced Public Events
OnBeginBusy  Event hook to give access to when the first process becomes active.
OnBeginYield  Event hook to give access to when the first process becomes active that was initiated with Yield as true.
OnEndBusy  Event hook to give access to when the last process is completed or aborted.
OnEndYield  Event hook to give access to when the last process is completed or aborted that was initiated with Yied as true.
OnGetDataLinkColor  Event hook ability to override default colorscheme assignments by datalinks.
OnSessionTimer  This provides a hook into the session timer that operated in the background.