From RAD Studio API Documentation
Jump to: navigation, search


function GotoKey: Boolean;


bool __fastcall GotoKey();


Type Visibility Source Unit Parent
function public
Bde.DBTables TTable


Moves the cursor to a record specified by the current key.

Use GotoKey to move to a record specified by key values assigned with previous calls to SetKey or EditKey and actual search values indicated in the Fields property.

If GotoKey finds a matching record, it positions the cursor on the record and returns true. Otherwise the current cursor position remains unchanged, and GotoKey returns false.

For Paradox and dBASE tables, the key must always be an index, which can be specified in the IndexName property. If IndexName is empty, GotoKey uses the table's primary index. GotoKey works with dBASE expression indexes.

For SQL tables, the key may correspond to a specified index in IndexName, or to a list of field names in the IndexFieldNames property.

See Also