public DataSet SelectFreshBooksSrvRows(DataSet myDataSet,string freshbooksConnection,string mySelectQuery,string myTableName)
{
FreshBooksConnection myConn = new FreshBooksConnection(freshbooksConnection);
FreshBooksDataAdapter myDataAdapter = new FreshBooksDataAdapter();
myDataAdapter.SelectCommand = new FreshBooksCommand(mySelectQuery, myConn);
FreshBooksCommandBuilder freshbooksCommandBuilder = new FreshBooksCommandBuilder(myDataAdapter);
myConn.Open();
DataSet myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet, "Departments");
//code to modify data in dataset here
//Without the FreshBooksCommandBuilder this line would fail
myDataAdapter.Update(myDataSet, "Departments");
myConn.Close();
return myDataSet;
}