public DataSet SelectMailChimpSrvRows(DataSet myDataSet,string mailchimpConnection,string mySelectQuery,string myTableName)
{
MailChimpConnection myConn = new MailChimpConnection(mailchimpConnection);
MailChimpDataAdapter myDataAdapter = new MailChimpDataAdapter();
myDataAdapter.SelectCommand = new MailChimpCommand(mySelectQuery, myConn);
MailChimpCommandBuilder mailchimpCommandBuilder = new MailChimpCommandBuilder(myDataAdapter);
myConn.Open();
DataSet myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet, "Departments");
//code to modify data in dataset here
//Without the MailChimpCommandBuilder this line would fail
myDataAdapter.Update(myDataSet, "Departments");
myConn.Close();
return myDataSet;
}