Using Locate for a TClientDataSet


2006-06-11 11:46:40 PM
cppbuilder31
Hello,
I use Locate to find a specific record in a TClientDataSet.
For some reasons, when I tried to test the EOF of this ClientDataSet, the
EOF is not true when it should be.
The Locate is supposed to give me the EOF of this ClientDataSet (I am 100%
sure).
I used to do this :
FindSuccess =
WorkingPurchaseTargetDataSet->Locate("Number",PurchaseNumber,SearchOptions);
This Locate is supposed to position the Cursor to the last record of my
ClientDataSet, but when I test EOF, it is not working.
In order to reposition the logical cursor, I do this :
WorkingPurchaseTargetDataSet->CursorPosChanged();
WorkingPurchaseTargetDataSet->Last();
WorkingPurchaseTargetDataSet->First();
WorkingPurchaseTargetDataSet->GotoBookmark(Bookmark);
WorkingPurchaseTargetDataSet->UpdateCursorPos();
Again, this code does not reposition the logical cursor to end of file.
Do I have to call specific functions when I use Locate in order to update
correctly the logical cursor of a TClientDataSet after calling the Locate
function...
Thanks for your help.
Jean Boivin