I was getting the below error while trying to refresh the dataset in the query designer.
The workaround was to refresh the dataset from Report Data panel
Right click the dataset and select Dataset properties
Click on Refresh Fields button and Ok to close the dialog box.
Hope this helps.