public DataSet SelectZohoBooksSrvRows(DataSet myDataSet,string ZohoBooksConnection,string mySelectQuery,string myTableName)
{
ZohoBooksConnection myConn = new ZohoBooksConnection(ZohoBooksConnection);
ZohoBooksDataAdapter myDataAdapter = new ZohoBooksDataAdapter();
myDataAdapter.SelectCommand = new ZohoBooksCommand(mySelectQuery, myConn);
ZohoBooksCommandBuilder ZohoBooksCommandBuilder = new ZohoBooksCommandBuilder(myDataAdapter);
myConn.Open();
DataSet myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet, "Departments");
//code to modify data in dataset here
//Without the ZohoBooksCommandBuilder this line would fail
myDataAdapter.Update(myDataSet, "Departments");
myConn.Close();
return myDataSet;
}