Właściwość ForEachADOEnumerator.Type
Pobiera lub ustawia wartość, która wskazuje jaki typ obiektu do wyliczenia nad.
Przestrzeń nazw: Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO
Zestaw: Microsoft.SqlServer.ForEachADOEnumerator (w Microsoft.SqlServer.ForEachADOEnumerator.dll)
Składnia
'Deklaracja
Public Property Type As ADOEnumerationType
Get
Set
'Użycie
Dim instance As ForEachADOEnumerator
Dim value As ADOEnumerationType
value = instance.Type
instance.Type = value
public ADOEnumerationType Type { get; set; }
public:
virtual property ADOEnumerationType Type {
ADOEnumerationType get () sealed;
void set (ADOEnumerationType value) sealed;
}
abstract Type : ADOEnumerationType with get, set
override Type : ADOEnumerationType with get, set
final function get Type () : ADOEnumerationType
final function set Type (value : ADOEnumerationType)
Wartość właściwości
Typ: Microsoft.SqlServer.Dts.Runtime.Enumerators.ADO.ADOEnumerationType
Wartość z ADOEnumerationType wyliczenia wskazująca co wyliczyć over.
Implementacje
Przykłady
Poniższy przykładowy kod ilustruje sposób użycia Type właściwość do rozróżniania typu obiektu, umożliwiając innym kodem zapisywane do obsługi różnych logika biznesowa, przełączanie pól wyboru w interfejs użytkownika lub uruchomione żadne inne specjalne procesy.
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;
}
Zobacz także