Partager via


ICommandImpl::CreateRowset

 

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 ICommandImpl::CreateRowset.

Called by Execute to create a single rowset.

Syntax

  
      template <class   
      RowsetClass  
      >  
HRESULT CreateRowset(  
   IUnknown* pUnkOuter,  
   REFIID riid,  
   DBPARAMS* pParams,  
   DBROWCOUNT* pcRowsAffected,  
   IUnknown** ppRowset,  
   RowsetClass*& pRowsetObj   
);  

Parameters

RowsetClass
A template class member representing the user's rowset class. Usually generated by the wizard.

pUnkOuter
[in] A pointer to the controlling IUnknown interface if the rowset is being created as part of an aggregate; otherwise, it is null.

riid
[in] Corresponds to riid in ICommand::Execute.

pParams
[in/out] Corresponds to pParams in ICommand::Execute.

pcRowsAffected
Corresponds to pcRowsAffected in ICommand::Execute.

ppRowset
[in/out] Corresponds to ppRowset in ICommand::Execute.

pRowsetObj
[out] A pointer to a rowset object. Typically this parameter is not used, but it can be used if you must perform more work on the rowset before passing it to a COM object. The lifetime of pRowsetObj is bound by ppRowset.

Return Value

A standard HRESULT value. See ICommand::Execute for a list of typical values.

Remarks

To create more than one rowset, or to provide your own conditions for creating different rowsets, place different calls to CreateRowset from within Execute.

See ICommand::Execute in the OLE DB Programmer's Reference.

Requirements

Header: atldb.h

See Also

ICommandImpl Class