集合(具有 #import 的视觉C++语法索引)

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

所有集合都继承 Count 属性和 Refresh 方法,所有集合都添加 属性。 Errors 集合添加 Clear 方法。 Parameters 集合继承 AppendDelete 方法,而 Fields 集合添加 AppendDeleteUpdate 方法。

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)
Fields 集合 (ADO)
Parameters 集合 (ADO)
属性集合 (ADO)