adoquery1.prior;
while adoquery1<>eof do
begin
if adoquery1.fileds[1]='op[op;k;lko' then
begin
  showmessage('找到了!');
  break;
end;
adoquery1.next;
end;

解决方案 »

  1.   

    这样太慢了,或者给我只刷新当前记录,并且dbgrid也会跟着变动的代码也行
      

  2.   

    if adoquery1.locate('text','op[op;k;lko',[]) then 
    showmessage('found')
    else 
    showmessage('not found');
      

  3.   

    with ADOQuery1 do
      begin
        Close;
        SQL.Clear;
        SQL.Add('SELECT * FROM table WHERE text = "op[op;k;lko"');
        Open;
        if Recordset.RecordCount = 0 then Exit;
        First;
        ADOTable1.RecNo := Fields[0].AsInteger + 1;
      end;
    注:其中dbgrid与ADOTable1相连
      

  4.   

    Query1.Active:=false;
    Query1.SQL.Clear();
    Query1.sql.add("select * from tablename order by id");
    Query1.active:=true;
    Query1.firsr();
    Query1.movoby(3);