Rohit_Nz
(Rohit Gupta)
1
While I am using TMS, Claude assures me the behaviour is in Delphi as well and that it is deliberate and useful. To the latter - I said rubbish.
It seems that
- on a filtered dataset,
- with the record being searched for, filtered out
- Locate finds the record but then gives an exception because the cursor cant be positioned on it
Then why is Locate a function at all? I hate needless exceptions disturbing the code flow.
Now I have to wrap all my locates with a try- except - into the future. YUCK.
EivindB
(Eivind Bakkestuen)
2
It shouldn’t according to the docs, point Claude here
https://docwiki.embarcadero.com/Libraries/Florence/en/Datasnap.DBClient.TCustomClientDataSet.Locate
Lachlan
(Lachlan Gemmell)
3
I feel like I remember this as a TClientDataSet bug from years ago that was fixed quite some time ago too. What Delphi version are you running?
Rohit_Nz
(Rohit Gupta)
4
I am running 12, but I think this is in TMS webcore, not in Delphi. I have registered it there as a bug.