CSession Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CSession Class.

Represents a single database access session.

class CSession  

Methods

AbortCancels (terminates) the transaction.
CloseCloses the session.
CommitCommits the transaction.
GetTransactionInfoReturns information regarding a transaction.
OpenOpens a new session for the data source object.
StartTransactionBegins a new transaction for this session.

One or more sessions can be associated with each provider connection (data source), which is represented by a CDataSource object. To create a new CSession for a CDataSource, call CSession::Open. To begin a database transaction, CSession provides the StartTransaction method. Once a transaction is started, you can commit to it using the Commit method, or cancel it using the Abort method.

Header: atldbcli.h

CatDB
OLE DB Consumer Templates
OLE DB Consumer Templates Reference

Show: