采用两个数据集,指向同一数据表。
采用三个过程
 第一个过程使两个数据集同步,使得第二个数据集的当前记录号比第一个数据集的记录号大一。
 第二个过程处理往后移。
 第三个过程处理往前移。procedure Tmove.FormCreate(Sender: TObject);
begin
table1.open;
table1.first;{使得指向第一条记录}
table2.open;
table1.First;
table2.next;{使得指向第二条记录}end;procedure Tmove.nextClick(Sender: TObject);
begin
table1.next;
if table1.Eof then
  table1.First;{当到达数据表末端时,转而指向第一条记录}
table2.next;
if table2.Eof then
 table2.first;{同上}end;procedure Tmove.priorClick(Sender: TObject);
begin
table1.Prior;
if table1.Bof then
  table1.Last;{使得数据表第一条记录的前一条为数据表的最后一条。}
table2.Prior;
if table2.Bof then
  table2.Last;{同上}
end;