Muokkaa

Jaa


IDBPropertiesImpl Class

Provides an implementation for the IDBProperties interface.

Syntax

template <class T>
class ATL_NO_VTABLE IDBPropertiesImpl
   : public IDBProperties, public CUtlProps<T>

Parameters

T
Your class, derived from IDBPropertiesImpl.

Requirements

Header: atldb.h

Members

Interface Methods

Name Description
GetProperties Returns the values of properties in the Data Source, Data Source Information, and Initialization property groups that are currently set on the data source object or the values of properties in the Initialization property group that are currently set on the enumerator.
GetPropertyInfo Returns information about all properties supported by the provider.
SetProperties Sets properties in the Data Source and Initialization property groups, for data source objects, or the Initialization property group, for enumerators.

Remarks

IDBProperties is a mandatory interface for data source objects and an optional interface for enumerators. However, if an enumerator exposes IDBInitialize, it must expose IDBProperties. IDBPropertiesImpl implements IDBProperties by using a static function defined by BEGIN_PROPSET_MAP.

IDBPropertiesImpl::GetProperties

Returns the values of properties in the Data Source, Data Source Information, and Initialization property groups that are currently set on the data source object or the values of properties in the Initialization property group that are currently set on the enumerator.

Syntax

STDMETHOD(GetProperties)(ULONG cPropertySets,
   const DBPROPIDSET rgPropertySets[],
   ULONG * pcProperties,
   DBPROPSET ** prgProperties);

Parameters

See IDBProperties::GetProperties in the OLE DB Programmer's Reference.

Some parameters correspond to OLE DB Programmer's Reference parameters of different names, which are described in IDBProperties::GetProperties:

OLE DB Template parameters OLE DB Programmer's Reference parameters
cPropertySets cPropertyIDSets
rgPropertySets rgPropertyIDSets
pcProperties pcPropertySets
prgProperties prgPropertySets

Remarks

If the provider is initialized, this method returns the values of properties in the DBPROPSET_DATASOURCE, DBPROPSET_DATASOURCEINFO, DBPROPSET_DBINIT property groups that are currently set on the data source object. If the provider is not initialized, it returns DBPROPSET_DBINIT group properties only.

IDBPropertiesImpl::GetPropertyInfo

Returns property information supported by the data source.

Syntax

STDMETHOD(GetPropertyInfo)(ULONG cPropertySets,
   const DBPROPIDSET rgPropertySets[],
   ULONG * pcPropertyInfoSets,
   DBPROPINFOSET ** prgPropertyInfoSets,
   OLECHAR ** ppDescBuffer);

Parameters

See IDBProperties::GetPropertyInfo in the OLE DB Programmer's Reference.

Some parameters correspond to OLE DB Programmer's Reference parameters of different names, which are described in IDBProperties::GetPropertyInfo:

OLE DB Template parameters OLE DB Programmer's Reference parameters
cPropertySets cPropertyIDSets
rgPropertySets rgPropertyIDSets

Remarks

Uses IDBInitializeImpl::m_pCUtlPropInfo to implement this functionality.

IDBPropertiesImpl::SetProperties

Sets properties in the Data Source and Initialization property groups, for data source objects, or the Initialization property group, for enumerators.

Syntax

STDMETHOD(SetProperties)(ULONG cPropertySets,
   DBPROPSET rgPropertySets[]);

Parameters

See IDBProperties::SetProperties in the OLE DB Programmer's Reference.

Remarks

If the provider is initialized, this method sets the values of properties in the DBPROPSET_DATASOURCE, DBPROPSET_DATASOURCEINFO, DBPROPSET_DBINIT property groups for the data source object. If the provider is not initialized, it sets DBPROPSET_DBINIT group properties only.

See also

OLE DB Provider Templates
OLE DB Provider Template Architecture