Logo

OLEDB Direct Components Suite

Session objects provide methods for creating commands and rowsets and for creating and modifying tables and indexes. They also define transaction scope and can be used to create transaction objects, which are used to control nested transactions.

Every TOLEDBDataSource object when it is open has MainSession that is open and closed automatically. Additionally, session list is supported.

When created, session is in in auto-commit mode, and any work done in the session is automatically committed. It cannot be aborted. But, if OLEDB provider supports transactions you can call StartTransaction method to enter manual-commit mode, and any work done in the such mode must be explicitly committed or aborted by calling Commit or Abort method.

Sessions support also schema information. Only schemas supported by provider can be returned. To determin is schema supported call SupportsSchema on session object.

See detailed schema descriptions in OLEDB SDK.

Schemas defined by OLEDB can be returned as dynamic arrays. You can call one of the following methods to get an appropriate schema:

Schema GUID Function
DBSCHEMA_ASSERTIONS GetAssertionsSchema
DBSCHEMA_CATALOGS GetCatalogsSchema
DBSCHEMA_CHARACTER_SETS GetCharacterSetsSchema
DBSCHEMA_CHECK_CONSTRAINTS GetCheckConstraintsSchema
DBSCHEMA_COLLATIONS GetCollationsSchema
DBSCHEMA_COLUMN_DOMAIN_USAGE GetColumnDomainUsageSchema
DBSCHEMA_COLUMN_PRIVILEGES GetColumnPrivilegesSchema
DBSCHEMA_COLUMNS GetColumnsSchema
DBSCHEMA_CONSRTAINT_COLUMN_USAGE GetConstraintColumnUsageSchema
DBSCHEMA_CONSTRAINT_TABLE_USAGE GetConstraintTableUsageSchema
DBSCHEMA_FOREIGN_KEYS GetForeignKeysSchema
DBSCHEMA_INDEXES GetIndexesSchema
DBSCHEMA_KEY_COLUMN_USAGE GetKeyColumnUsageSchema
DBSCHEMA_PRIMARY_KEYS GetPrimaryKeysSchema
DBSCHEMA_PROCEDURE_COLUMNS GetProcedureColumnsSchema
DBSCHEMA_PROCEDURE_PARAMETERS GetProcedureParametersSchema
DBSCHEMA_PROCEDURES GetProceduresSchema
DBSCHEMA_PROVIDER_TYPES GetProviderTypesSchema
DBSCHEMA_REFERENTIAL_CONSTRAINTS GetReferentialConstraintsSchema
DBSCHEMA_SCHEMATA GetSchemataSchema
DBSCHEMA_SQL_LANGUAGES GetSQLLanguagesSchema
DBSCHEMA_STATISTICS GetStatisticsSchema
DBSCHEMA_TABLE_CONSTRAINTS GetTableConstraintsSchema
DBSCHEMA_PRIVILEGES GetTablePrivilegesSchema
DBSCHEMA_TABLES GetTablesSchema
DBSCHEMA_TRANSLATIONS GetTranslationsSchema
DBSCHEMA_USAGE_PRIVILEGES GetUsagePrivilegesSchema
DBSCHEMA_VIEW_COLUMN_USAGE GetViewColumnUsageSchema
DBSCHEMA_VIEW_TABLE_USAGE GetViewTableUsageSchema
DBSCHEMA_VIEWS GetViewsSchema
DBSCHEMA_TABLES_INFO_SCHEMA GetTablesInfoSchema
DBSCHEMA_TRUSTEE GetTrusteeSchema
DBSCHEMA_TABLE_STATISTICS GetTableStatisticsSchema
DBSCHEMA_CHECK_CONSTRAINTS_BY_TABLE GetCheckConstraintsByTableSchema