If your SampleField is of type fkCalculated , I donβt think you can use this field as the field whose value you are trying to find when calling Locate .
The reason that Locate calls TCustomADODataSet.LocateRecord , which generates the error you specified, and the reason it makes it, is that SampleField not a field in the ADO Recordset that underlies TCustomADODataSet . An exception occurs when Cursor.MoveNext called.
To do what you want, try building a calculated field in the SQL expression used to get the row data from the database. Depending on the server you are using, you may need to use TAdoQuery instead of TAdoTable to get the rows.
source share