共用方式為


集合 (具有 #import 的 Visual C++ 語法索引)

知道集合繼承某些通用方法和屬性很有用。

所有集合都會繼承 count 屬性和 Refresh 方法,而且所有集合都會新增 Item 屬性。 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[];  

另請參閱

Errors 集合 (ADO)
Fields 集合 (ADO)
Parameters 集合 (ADO)
Properties 集合 (ADO)