如何使用BOOKMARK保存当前记录指针

字体大小: 中小 标准 ->行高大小: 标准
在修改完记录集中的一条记录后,用Adoquery的Refresh方法刷新,如何让刷新后的记录集当前指针回到原来的记录,就需要用Bookmark:

var bm:Tbookmark;
begin
 bm:=adoquery1.GetBookmark;
if not adoquery1.Eof then
adoquery1.edit;
//修改操作
adoquery1.Refresh;
adoquery1.GotoBookmark(bm);
end;

此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/67737.html