ADOEnumerationType 列舉
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
描述列舉主題的對象。
public enum class ADOEnumerationType
public enum ADOEnumerationType
type ADOEnumerationType =
Public Enum ADOEnumerationType
- 繼承
-
ADOEnumerationType
欄位
| 名稱 | 值 | Description |
|---|---|---|
| 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 該性質所使用。 成員描述中提到的變數物件,指的是包含該資料物件的執行時變數。