dotConnect for Mailchimp Documentation
Devart.Data.MailChimp Namespace / MailChimpCommand Class / Connection Property
Example

In This Topic
    Connection Property (MailChimpCommand)
    In This Topic
    Gets or sets the MailChimpConnection used by this instance of the MailChimpCommand.
    Syntax
    'Declaration
     
    Public Shadows Property Connection As MailChimpConnection
    public new MailChimpConnection Connection {get; set;}

    Property Value

    The connection to a data source. The default value is a null reference.
    Remarks

    MailChimpConnection specified in this property will carry out all operations executed with this MailChimpCommand.

    Example
    The following example creates a MailChimpCommand and sets some of its properties.
    public void CreateCommand()
    {
      string mySelectQuery = "SELECT * FROM Folders ORDER BY Id";
      MailChimpCommand mailchimpCommand = new MailChimpCommand(mySelectQuery);
      mailchimpCommand.Connection = new MailChimpConnection(
        "api key=8b10fe893c9732d12befe0b7d846ffcb-us10;");
      mailchimpCommand.CommandType = System.Data.CommandType.Text;
    }
    Public Sub CreateCommand()
      Dim mySelectQuery As String = _
        "SELECT * FROM Folders ORDER BY Id"
      Dim mailchimpCommand As New MailChimpCommand(mySelectQuery)
      mailchimpCommand.Connection = New MailChimpConnection( _
        "api key=8b10fe893c9732d12befe0b7d846ffcb-us10;")
      mailchimpCommand.CommandType = System.Data.CommandType.Text
    End Sub
    See Also