ActiveRecord not reset on a close

I encountered a situation where I have a TOracleDataset that when opened has more than 50 records assigned to it. Its also attached to a grid so that ActiveRow ends up being somewhere in the upper 20's. A filter is then applied (IE. The set is closed, the where clause is modified and it is reopened) so the new dataset only has one record. However, Active record is still way up there in the 20's and results in a "Bookmark not found" error from InternalGotoBookmark being called indirectly by GetRecNo. Is there a simple fix for this. Can TDataSet.ClearBuffers be called as the final part of TOracleDataset's internalClose?
 
More info. This almost seems like a timing issue.
When it fails Paint is being called on the DBgrid. (Probably via a process messages). Dataset is active with record count of 1, but FActiveRecord is 27/28. Doing some more checking.
 
Let me know if you know how we could reproduce this, and we'll try to fix it.

Note that you don't need to close the dataset if you only change the where clause. You can simply call Refresh instead, which is a visually smoother operation.
 
Sorry, Unable to get a reproducible for you outside of our product. It was easy to add a precheck to avoid calling RecNo. So for now it is a non-issue. However, I have left it on my to do list and hopefully can get you a reproducible at a later date.
 
Back
Top