Compartir a través de


SCHEMA_ENTRY

Associates a GUID with a class.

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

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 Project Wizard creates, as described in IDBSchemaRowset in the OLE DB Programmer's Reference, three initial schema rowsets in the project for each of the three mandatory OLE DB schemas:

  • DBSCHEMA_TABLES

  • DBSCHEMA_COLUMNS

  • DBSCHEMA_PROVIDER_TYPES

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.

Requirements

Header: atldb.h

See Also

Concepts

Macros for OLE DB Provider Templates

BEGIN_SCHEMA_MAP

END_SCHEMA_MAP