SCHEMA_ENTRY

SCHEMA_ENTRY( guid, rowsetClass );

Parameters

guid

A schema rowset GUID. See IDBSchemaRowset in the OLE DB Programmer's Reference for a list of schema rowsets and their GUIDs.

rowsetClass

The class that will be created to represent the schema rowset. 

Remarks

This macro associates a GUID with a class. IDBSchemaRowsetImpl can then query the map for a list of GUIDs, or it can create a rowset if it is given a GUID. The schema rowset IDBSchemaRowsetImpl creates is similar to a standard CRowsetImpl-derived class, except it must provide an Execute method that has the following signature:

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

This Execute function populates the rowset's data. The ATL Object Wizard creates three initial schema rowsets in the project: one for each of the three mandatory OLE DB schemas (DBSCHEMA_TABLES, DBSCHEMA_COLUMNS, and DBSCHEMA_PROVIDER_TYPES, as described in IDBSchemaRowset in the OLE DB Programmer's Reference). The wizard also adds three corresponding entries in the schema map. See Creating an OLE DB Template Provider for more information about using the wizard to create a provider.

Macros for OLE DB Provider Templates

See Also

BEGIN_SCHEMA_MAP, END_SCHEMA_MAP