ICommandImpl::CreateRowset

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

See in the OLE DB Programmer's Reference.

Return Value

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

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.

Remarks

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

ICommandImpl OverviewClass Members