CSession::Open

 

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::Open.

Opens a new session for the data source object.

Syntax

  
      HRESULT Open(  
   const CDataSource& ds,  
   DBPROPSET *pPropSet = NULL,  
   ULONG ulPropSets = 0  
) throw( );  

Parameters

ds
[in] The data source for which the session is to be opened.

pPropSet
[in] A pointer to an array of DBPROPSET structures containing properties and values to be set. See Property Sets and Property Groups in the OLE DB Programmer's Reference in the Windows SDK.

ulPropSets
[in] The number of DBPROPSET structures passed in the pPropSet argument.

Return Value

A standard HRESULT.

Remarks

You must open the data source object using CDataSource::Open before passing it to CSession::Open.

Requirements

Header: atldbcli.h

See Also

CSession Class