public DataSet SelectQuickBooksSrvRows(DataSet myDataSet,string quickBooksConnection,string mySelectQuery,string myTableName)
{
QuickBooksConnection myConn = new QuickBooksConnection(quickBooksConnection);
QuickBooksDataAdapter myDataAdapter = new QuickBooksDataAdapter();
myDataAdapter.SelectCommand = new QuickBooksCommand(mySelectQuery, myConn);
QuickBooksCommandBuilder quickBooksCommandBuilder = new QuickBooksCommandBuilder(myDataAdapter);
myConn.Open();
DataSet myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet, "Departments");
//code to modify data in dataset here
//Without the QuickBooksCommandBuilder this line would fail
myDataAdapter.Update(myDataSet, "Departments");
myConn.Close();
return myDataSet;
}