다음을 통해 공유


IDBSchemaRowsetImpl::SetRestrictions

Specifies which restrictions you support on a particular schema rowset.

void SetRestrictions( 
   ULONG cRestrictions, 
   GUID* /* rguidSchema */, 
   ULONG* rgRestrictions  
);

매개 변수

  • cRestrictions
    [in] The number of restrictions in the rgRestrictions array and the number of GUIDs in the rguidSchema array.

  • rguidSchema
    [in] An array of the GUIDs of the schema rowsets for which to fetch restrictions. Each array element contains the GUID of one schema rowset (for example, DBSCHEMA_TABLES).

  • rgRestrictions
    [in] An array of length cRestrictions of restriction values to be set. Each element corresponds to the restrictions on the schema rowset identified by the GUID. If a schema rowset is not supported by the provider, the element is set to zero. Otherwise, the ULONG value contains a bit mask that represents the restrictions supported on that schema rowset. For more information on which restrictions correspond to a particular schema rowset, consult the table of schema rowset GUIDs in IDBSchemaRowset in the OLE DB Programmer's Reference in the Windows SDK.

설명

The IDBSchemaRowset object calls SetRestrictions to determine which restrictions you support on a particular schema rowset (it is called by GetSchemas through an upcasted pointer). 제한을 설정하면 사용자가 "MyTable"이라는 테이블의 모든 열을 찾은 다음 일치하는 행만 페치할 수 있습니다. 제한은 선택 사항입니다. 제한을 지원하지 않을 경우, 즉 기본값을 사용할 경우에는 모든 데이터가 반환됩니다.

The default implementation of this method sets the rgRestrictions array elements to 0. Override the default in your session class to set restrictions other than the default.

For information on implementing schema rowset support, see Supporting Schema Rowsets.

스키마 행 집합을 지원하는 공급자 예제는 UpdatePV 샘플을 참조하십시오.

For more information on schema rowsets, see IDBSchemaRowset in the OLE DB Programmer's Reference in the Windows SDK.

요구 사항

Header: atldb.h

참고 항목

참조

IDBSchemaRowsetImpl 클래스

스키마 행 집합 클래스 및 Typedef 클래스

개념

스키마 행 집합 지원

UpdatePV

기타 리소스

IDBSchemaRowsetImpl Class Members