IDBSchemaRowsetImpl::CheckRestrictions
The latest version of this topic can be found at IDBSchemaRowsetImpl::CheckRestrictions.
Checks the validity of restrictions against a schema rowset.
Syntax
HRESULT CheckRestrictions(
REFGUID rguidSchema,
ULONG cRestrictions,
const VARIANT rgRestrictions[]
);
Parameters
rguidSchema
[in] A reference to the requested schema rowset GUID (for example, DBSCHEMA_TABLES
).
cRestrictions
[in] The number of restrictions that the consumer passed in for the schema rowset.
rgRestrictions
[in] An array of length cRestrictions of restriction values to be set. For more information, see the description of the rgRestrictions
parameter in SetRestrictions.
Remarks
Use CheckRestrictions
to check the validity of restrictions against a schema rowset. It checks restrictions for DBSCHEMA_TABLES
, DBSCHEMA_COLUMNS, and DBSCHEMA_PROVIDER_TYPES schema rowsets. Call it to determine if a consumer's call to IDBSchemaRowset::GetRowset is correct. If you want to support schema rowsets other than those listed above, you should create your own function to carry out this task.
CheckRestrictions
determines if the consumer is calling GetRowset with the correct restriction and the correct restriction type (for example, a VT_BSTR
for a string) that the provider supports. It also determines if the correct number of restrictions are supported. By default, CheckRestrictions
will ask the provider, through the SetRestrictions call, which restrictions it supports on a given rowset. It then compares the restrictions from the consumer against those supported by the provider and either succeeds or fails.
For more information on schema rowsets, see IDBSchemaRowset in the OLE DB Programmer's Reference in the Windows SDK.
Requirements
Header: atldb.h
See Also
IDBSchemaRowsetImpl Class
IDBSchemaRowsetImpl Class Members
Schema Rowset Classes and Typedef Classes