Freigeben über


CRowsetImpl Class

Provides a standard OLE DB rowset implementation without requiring multiple inheritance of many implementation interfaces.

template <
   class T,
   class Storage,
   class CreatorClass,
   class ArrayType = CAtlArray<Storage>, 
   class RowClass = CSimpleRow, 
   class RowsetInterface = IRowsetImpl < T, IRowset > 
>
class CRowsetImpl :  
   public CComObjectRootEx<CreatorClass::_ThreadModel>, 
   public CRowsetBaseImpl<T, Storage, ArrayType, RowsetInterface>, 
   public IRowsetInfoImpl<T, CreatorClass::_PropClass>

Parameters

  • T
    The user's class that derives from CRowsetImpl.

  • Storage
    The user record class.

  • CreatorClass
    The class that contains properties for the rowset; typically the command.

  • ArrayType
    The class that will act as storage for the rowset's data. This parameter defaults to CAtlArray, but it can be any class that supports the required functionality.

Remarks

CRowsetImpl provides overrides in the form of static upcasts. The methods control the manner in which a given rowset will validate command text. You can create your own CRowsetImpl-style class by making your implementation interfaces multiple-inherited. The only method for which you must provide implementation is Execute. Depending on what type of rowset you are creating, the creator methods will expect different signatures for Execute. For example, if you are using a CRowsetImpl-derived class to implement a schema rowset, the Execute method will have the following signature:

HRESULT Execute(LONG* pcRows, ULONG cRestrictions, const VARIANT* rgRestrictions)

If you are creating a CRowsetImpl-derived class to implement a command or session's rowset, the Execute method will have the following signature:

HRESULT Execute(LONG* pcRows, DBPARAMS* pParams)

To implement any of the CRowsetImpl-derived Execute methods, you must populate your internal data buffers (m_rgRowData).

Requirements

Header: atldb.h

See Also

Other Resources

CRowsetImpl Members