Print Thread
ActiveRecord not reset on a close
#6226 03/23/04 09:21 PM
Joined: Sep 1999
Posts: 41
Lake Forest, CA 92630
G
Member
OP Offline
Member
G
Joined: Sep 1999
Posts: 41
Lake Forest, CA 92630
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?

Re: ActiveRecord not reset on a close
#6227 03/23/04 09:44 PM
Joined: Sep 1999
Posts: 41
Lake Forest, CA 92630
G
Member
OP Offline
Member
G
Joined: Sep 1999
Posts: 41
Lake Forest, CA 92630
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.

Re: ActiveRecord not reset on a close
#6228 03/23/04 10:36 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
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.


Marco Kalter
Allround Automations
Re: ActiveRecord not reset on a close
#6229 03/26/04 02:17 AM
Joined: Sep 1999
Posts: 41
Lake Forest, CA 92630
G
Member
OP Offline
Member
G
Joined: Sep 1999
Posts: 41
Lake Forest, CA 92630
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.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.186s Queries: 14 (0.041s) Memory: 2.5096 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-05-03 23:39:19 UTC
Valid HTML 5 and Valid CSS