다음을 통해 공유


컬렉션(#import 포함된 Visual C++ 구문 인덱스)

컬렉션이 특정 공통 메서드 및 속성을 상속한다는 것을 아는 것이 유용합니다.

모든 컬렉션은 Count 속성과 Refresh 메서드를 상속하고 모든 컬렉션은 Item 속성을 추가합니다. Errors 컬렉션은 Clear 메서드를 추가합니다. Parameters 컬렉션은 추가Delete 메서드를 상속하고 Fields 컬렉션은 추가, 삭제 및 Update 메서드를 추가합니다.

Properties 컬렉션

방법

HRESULT Refresh( );  

속성

long GetCount( ); __declspec(property(get=GetCount)) long Count;  
PropertyPtr GetItem( const _variant_t & Index ); __declspec(property(get=GetItem)) PropertyPtr Item[];  

Errors 컬렉션

방법

HRESULT Clear( );  
HRESULT Refresh( );  

속성

long GetCount( ); __declspec(property(get=GetCount)) long Count;  
PropertyPtr GetItem( const _variant_t & Index ); __declspec(property(get=GetItem)) PropertyPtr Item[];  

Parameters 컬렉션

방법

HRESULT Append( IDispatch * Object );  
HRESULT Delete( const _variant_t & Index );  
HRESULT Refresh( );  

속성

long GetCount( ); __declspec(property(get=GetCount)) long Count;  
PropertyPtr GetItem( const _variant_t & Index ); __declspec(property(get=GetItem)) PropertyPtr Item[];  

Fields 컬렉션

방법

HRESULT Append( _bstr_t Name, enum DataTypeEnum Type, long DefinedSize, enum FieldAttributeEnum Attrib, const _variant_t & FieldValue = vtMissing );  
HRESULT Delete( const _variant_t & Index );  
HRESULT Refresh( );  
HRESULT Update( );  

속성

long GetCount( ); __declspec(property(get=GetCount)) long Count;  
PropertyPtr GetItem( const _variant_t & Index ); __declspec(property(get=GetItem)) PropertyPtr Item[];  

참고 항목

ADO(Errors Collection)
ADO(Fields 컬렉션)
ADO(Parameters 컬렉션)
ADO(속성 컬렉션)