CreateCommand Method (MailChimpConnection)
Creates and returns a
MailChimpCommand object associated with the
MailChimpConnection.
In this sample
MailChimpCommand object is created. It is automatically associated with
MailChimpConnection that created it.
|
|---|
public void CreateMailChimpCommand(string myConnString)
{
MailChimpConnection mailchimpConnection = new MailChimpConnection(myConnString);
MailChimpCommand mailchimpCommand = mailchimpConnection.CreateCommand();
mailchimpCommand.CommandText = "INSERT INTO Folders(Name, Type) VALUES ('Sales', 'campaign')";
mailchimpConnection.Open();
try
{
mailchimpCommand.ExecuteNonQuery();
}
finally
{
mailchimpConnection.Close();
}
} |
|
|---|
Public Sub CreateMailChimpCommand(ByVal myConnString As String)
Dim mailchimpConnection As New MailChimpConnection(myConnString)
Dim mailchimpCommand As MailChimpCommand = mailchimpConnection.CreateCommand()
mailchimpCommand.CommandText = "INSERT INTO Folders(Name, Type) VALUES ('Sales', 'campaign')"
mailchimpConnection.Open()
Try
mailchimpCommand.ExecuteNonQuery()
Finally
mailchimpConnection.Close()
End Try
End Sub |