DAC for MySQL

Example: SetKey, GotoNearest

Previous Next

To set cursor to row in which City field begins with 'Santa':

with MySQLTable1 do
begin
  SetKey;
  FieldByName('State').AsString := 'CA';
  FieldByName('City').AsString  := 'Santa';
  GotoNearest;
end;
See also:TmySQLTable.SetKey(), TmySQLTable.GotoNearest() methods