CRestrictions Class

A generic class that allows you to specify restrictions for schema rowsets.

Syntax

template <class T, short nRestrictions, const GUID* pguid>
class CRestrictions :
   public CSchemaRowset <T, nRestrictions>

Parameters

T
The class used for the accessor.

nRestrictions
The number of restriction columns for the schema rowset.

pguid
A pointer to the GUID for the schema.

Requirements

Header: atldbsch.h

Members

Methods

Name Description
Open Returns a result set according to the user-supplied restrictions.

CRestrictions::Open

Returns a result set according to the user-supplied restrictions.

Syntax

HRESULT Open(const CSession& session,
   LPCTSTR lpszParam 1 = NULL,
   LPCTSTR lpszParam 2 = NULL,
   LPCTSTR lpszParam 3 = NULL,
   LPCTSTR lpszParam 4 = NULL,
   LPCTSTR lpszParam 5 = NULL,
   LPCTSTR lpszParam 6 = NULL,
   LPCTSTR lpszParam 7 = NULL,
   bool bBind = true);

Parameters

session
[in] Specifies an existing session object used to connect to the data source.

lpszParam
[in] Specifies the restrictions on the schema rowset.

bBind
[in] Specifies whether to bind the column map automatically. The default is true, which causes the column map to be bound automatically. Setting bBind to false prevents the automatic binding of the column map so that you can bind manually. (Manual binding is of particular interest to OLAP users.)

Return Value

One of the standard HRESULT values.

Remarks

You can specify a maximum of seven restrictions on a schema rowset.

See IDBSchemaRowset for information about the defined restrictions on each schema rowset.

See also

OLE DB Consumer Templates
OLE DB Consumer Templates Reference
Schema Rowset Classes and Typedef Classes