这个行号的话,你可以用当前记录号来记录它,类似于如下: procedure TForm1.Button1Click(Sender: TObject); var iCurr :integer; SavePlace: TBook; begin with adoquery1 do begin { get a book so that we can return to the same record } SavePlace := GetBook; {do something} try {go to back} GotoBook(SavePlace); { Free the book } finally FreeBook(SavePlace); end; end;
能可告诉具体怎么用吗?谢谢。
procedure TForm1.Button1Click(Sender: TObject);
var
iCurr :integer;
SavePlace: TBook;
begin
with adoquery1 do
begin
{ get a book so that we can return to the same record }
SavePlace := GetBook;
{do something}
try
{go to back}
GotoBook(SavePlace);
{ Free the book }
finally
FreeBook(SavePlace);
end;
end;