Table1.First; n:=1; while not Table1.Eof do begin if n=i then Result:=table1.FieldByName('name').valueend;
Table1.First; n:=1; while not Table1.Eof do begin if n=i then begin Result:=table1.FieldByName('name').value; ;//你要的结果 exit end else begin Table1.Next; n:=n+1 end; end; 或 Table1.first; bool:=False; for n:=1 to i do begin if not table1.eof then Table1.next else begin showmessage('没有第i行记录'); bool:=True; end; end; if not bool then Result:=Table1.FieldByName('Name').Value;//你要的结果
n:=1;
while not Table1.Eof do
begin
if n=i then Result:=table1.FieldByName('name').valueend;
n:=1;
while not Table1.Eof do
begin
if n=i then
begin Result:=table1.FieldByName('name').value; ;//你要的结果
exit
end
else begin Table1.Next; n:=n+1 end;
end;
或
Table1.first;
bool:=False;
for n:=1 to i do
begin
if not table1.eof then Table1.next
else
begin showmessage('没有第i行记录');
bool:=True;
end;
end;
if not bool then
Result:=Table1.FieldByName('Name').Value;//你要的结果
Table1.First;
Table1.MoveBy(n-1);
然后用table1.FieldByName('name').AsString取Name的值