语言

ADOEnumerationType 枚举

定义

描述列举对象的对象。

public enum class ADOEnumerationType
public enum ADOEnumerationType
type ADOEnumerationType = 
Public Enum ADOEnumerationType
继承
ADOEnumerationType

字段

名称 值 说明
EnumerateTables 0

当变量包含数据集时,该设置枚举了该数据集中的所有表。 当变量包含数据表时,运行时会触发错误。 当它包含记录集时,会枚举该记录集中的所有行。

EnumerateAllRows 1

当变量包含数据集时,该设置枚举了数据集中所有表中的所有行。 当变量包含数据表时,该设置枚举表中的所有行。 当它包含记录集时,会枚举该记录集中的所有行。

EnumerateRowsInFirstTable 2

当变量包含数据集时,该设置枚举数据集中第一个表中的所有行。 当变量包含数据表时,它枚举表中的所有行。 当它包含记录集时,会枚举该记录集中的所有行。

示例

以下代码示例展示了如何利用该 Type 属性区分对象类型,允许编写不同的代码来处理不同的业务逻辑、切换用户界面中的复选框或运行其他特殊进程。

m_Enum = (ForEachADOEnumerator)FEEHost.InnerObject;  
    if( m_Enum != null )  
    {  
        switch( m_Enum.Type )  
        {  
            case ADOEnumerationType.EnumerateAllRows:  
                // Insert custom code here.  
                break;  

            case ADOEnumerationType.EnumerateRowsInFirstTable:  
                // Insert custom code here.  
                break;  

            case ADOEnumerationType.EnumerateTables:  
                // Insert custom code here.  
                break;  

            default:  
                // Insert custom code here.  
                break;  
        }  

注解

此属性使用此 Type 枚举。 成员描述中提到的变量对象指的是包含该数据对象的运行时变量。

适用于