combit List & Label 27 - .NET Hilfe
combit.Reporting.DataProviders Namespace / DbCommandSetDataProvider Klasse / AddCommand Methode / AddCommand(IDbCommand,String) Methode

Der hinzuzufügende Befehl.

Der Name der daraus resultierenden Tabelle.

Beispiele


In diesem Thema
    AddCommand(IDbCommand,String) Methode
    In diesem Thema
    Fügt dem Provider einen Befehl hinzu. Das Resultat ist eine zusätzliche Tabelle im Designer.
    Syntax
    'Deklaration
     
    
    Public Overloads Sub AddCommand( _
       ByVal command As IDbCommand, _
       ByVal tableName As String _
    ) 
    public void AddCommand( 
       IDbCommand command,
       string tableName
    )
    public:
    void AddCommand( 
       IDbCommand^ command,
       String^ tableName
    ) 

    Parameter

    command

    Der hinzuzufügende Befehl.

    tableName

    Der Name der daraus resultierenden Tabelle.

    Beispiele
    OleDbCommand command = new OleDbCommand("Select * from [Customers]", conn);
    OleDbCommand command2 = new OleDbCommand("Select * from [Orders]", conn);
    DbCommandSetDataProvider provider = new DbCommandSetDataProvider();
    provider.AddCommand(command, "Customers");
    provider.AddCommand(command2, "Orders");
    provider.AddRelation("Customers2Orders", "Customers", "Orders", "CustomerID", "CustomerID");
    LL.DataSource = provider;
    LL.Design();
    Dim command As New OleDbCommand("Select * from [Customers]", conn)
    Dim command2 As New OleDbCommand("Select * from [Orders]", conn)
    Dim provider As New DbCommandSetDataProvider()
    provider.AddCommand(command, "Customers")
    provider.AddCommand(command2, "Orders")
    provider.AddRelation("Customers2Orders", "Customers", "Orders", "CustomerID", "CustomerID")
    LL.DataSource = provider
    LL.Design()
    Anforderungen

    Plattformen: Windows 8.1 bis Windows 10 (Version 20H2 - 21H2), Windows 11 (21H2), Windows Server 2012 - 2022

    Siehe auch