Hi
At my current app, I used a TFDMemTable to store some data.
Now I try to explicitely move to a certain record by using the Locate() method (see code below). The first time I performing the code it works (cursor changes to the selected record). After that, it doesn't work anymore. The curser remains on the record, which was selected at first code execution. This is not what I want. I want to explicitely select records from that dataset due to a user input.
What am I doing wrong?
Kind regardsThomas
--------------
TLocateOptions opt;
opt.Clear();
int iKey = DBEdit1->Text.ToInt();
bool bRet = DBEdit1->DataSource->DataSet->Locate("SORTCODE",Variant(iKey), opt);
if (bRet == true)
{
int iRec = DBEdit1->DataSource->DataSet->RecNo;
}