Collections (Visual C++ Syntax Index with #import)

Microsoft ActiveX Data Objects (ADO)

Collections (Visual C++ Syntax Index with #import)

It is useful to know that collections inherit certain common methods and properties.

All collections inherit the Count property and Refresh method, and all collections add the Item property. The Errors collection adds the Clear method. The Parameters collection inherits the Append and Delete methods, while the Fields collection adds the Append, Delete, and Update methods.

Properties Collection

Methods

HRESULT Refresh( );

Properties

long GetCount( ); 
__declspec(property(get=GetCount)) long Count;

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

Errors Collection

Methods

HRESULT Clear( );

HRESULT Refresh( );

Properties

long GetCount( ); 
__declspec(property(get=GetCount)) long Count;

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

Parameters Collection

Methods

HRESULT Append( IDispatch * Object );

HRESULT Delete( const _variant_t & Index );

HRESULT Refresh( );

Properties

long GetCount( ); 
__declspec(property(get=GetCount)) long Count;

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

Fields Collection

Methods

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( );

Properties

long GetCount( ); 
__declspec(property(get=GetCount)) long Count;

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