Query1.Active:=false;
Query1.SQL.Clear();
Query1.sql.add("select * from tablename order by id");
Query1.active:=true;
Query1.firsr();
Query1.movoby(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相连