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 |