public void InsertRow(string exactTargetConnectionString)
{
// If the connection string is empty, use default.
if(exactTargetConnectionString == "")
{
exactTargetConnectionString =
"user=MyCompanyAdmin;password=mypassword;url=https://webservice.s7.exacttarget.com/Service.asmx;";
}
ExactTargetConnection myConn = new ExactTargetConnection(exactTargetConnectionString);
string myInsertQuery = "INSERT INTO Email (Name, Subject) VALUES ('Sale', 'Big Sale!')";
ExactTargetCommand exactTargetCommand = new ExactTargetCommand(myInsertQuery);
exactTargetCommand.Connection = myConn;
myConn.Open();
try
{
exactTargetCommand.ExecuteNonQuery();
}
finally
{
myConn.Close();
}
}