集合(使用 #import 的 Visual C++ 语法索引)

知道集合继承某些常见方法和属性很有用。

所有集合均继承了 Count 属性和 Refresh 方法,所有集合都添加了 Item 属性。 Errors 集合添加了 Clear 方法。 Parameters 集合继承了 Append 和 Delete 方法,而 Fields 集合则添加了 Append、Delete 和 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)
字段集合 (ADO)
参数集合 (ADO)
属性集合 (ADO)