OSession

The OSession object controls the behavior of an entire database session. You can access more than one database in a session. Typically an application has a single session, but applications can have more. A session is the unit on which transactions occur.

Please see
Transactions for more complete information on transactions.

Database objects share the connection to the database if they are created on the same session (by using the same session as an argument in the ODatabase::Open method), and if they have the same connection information (database name, username, and password).

You can get OSession objects from OConnection, ODatabase, ODynaset, or OSessionCollection objects using the GetSession method.

Normally you will use the default session, for which you provide no name. You can also open sessions with specific names. Later you can get a list of sessions from the client object and identify sessions by name.

The OSession class supports the following methods:

Construction and destruction:

OSession

~OSession

operator=

Attributes:

operator==

operator!=

GetName

GetVersion

IsOpen

Operations:

BeginTransaction
Close
Commit
CreateDatabasePool Method
DestroyDatabasePool Method
GetClient
GetConnections
GetDatabaseFromPool

GetDbPoolCurrentSize Method
GetDbPoolInitialSize Method
GetDbPoolMaxSize Method
GetNamedSession
Open
ResetTransaction
Rollback
Error Handling:

ErrorNumber
ErrorReset
GetErrorText
GetServerErrorText
LookupErrorText
ServerErrorNumber
ServerErrorReset