Al C
Al C

Reputation: 5377

Why would ClientDataSet's Locate method fail to find a record that exists?

Every once in awhile, in ways that seem unpredictable to me, the code line

if not CDS.Locate('Name',aName,[]) then ...

resolves true (i.e., cannot find the string aName in the field 'Name') even though I know there is a record. I can close and reopen the application, load the exact same file, run the exact same command--repeat all my actions, in other words--and have everything work as expected the next time through. And the time after that. I can even just reopen the same file, and the code will run as expected ... I don't know what the issue is and, frankly, with something intermittent like this I don't even know where to look!

Any thoughts about where to start? ...

Upvotes: 1

Views: 3344

Answers (1)

Charles Faiga
Charles Faiga

Reputation: 11753

In delphi XE7 there is a serious problem TClientDataSet.Locate and it does not work with some fields look at QualityCentral [127703]

Upvotes: 1

Related Questions