Go to main content
Oracle® Objects for OLE C++ Class Library Developer's Guide
10g Release 2 (10.2)

B14308-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

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
ChangePassword
Close
Commit
CreateDatabasePool
DestroyDatabasePool
GetClient
GetConnections
GetDatabaseFromPool
GetDbPoolCurrentSize
GetDbPoolInitialSize
GetDbPoolMaxSize
GetNamedSession
Open
ResetTransaction
Rollback
Error Handling:
ErrorNumber
ErrorReset
GetErrorText
GetServerErrorText
LookupErrorText
ServerErrorNumber
ServerErrorReset