public DataSet SelectExactTargetSrvRows(DataSet myDataSet,string exactTargetConnection,string mySelectQuery,string myTableName)
{
ExactTargetConnection myConn = new ExactTargetConnection(exactTargetConnection);
ExactTargetDataAdapter myDataAdapter = new ExactTargetDataAdapter();
myDataAdapter.SelectCommand = new ExactTargetCommand(mySelectQuery, myConn);
ExactTargetCommandBuilder exactTargetCommandBuilder = new ExactTargetCommandBuilder(myDataAdapter);
myConn.Open();
DataSet myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet, "Departments");
//code to modify data in dataset here
//Without the ExactTargetCommandBuilder this line would fail
myDataAdapter.Update(myDataSet, "Departments");
myConn.Close();
return myDataSet;
}