怎么读出一张表里的所有内容?(20分)

L

lcl_003

Unregistered / Unconfirmed
GUEST, unregistred user!
怎么读出一张表里的所有内容?比如我想把一张表里的记录都读出来然后放到stringgrid
里(不用dbgrid,因为dbgrid不能满足要求)。用adotable连接数据库
 
用循環不行嗎?
while adotable.eof do
begin
..
..
..
end;
 
我知道,我是不知道怎么读表的记录。用fieldbyname只返回第一条记录:(
 
adotable.first;
while not adotable.eof do
begin
a=adotable.fieldbyname('字段1').value ; //把字段copy到變數中
b=.......;
c=....;
{然后給stringgrid中附值}
.....
adotable.next;
end;
 
同意jeary
 
table.next取下一条
table.eof到头了
 
同意楼上
 
忘了next:)
 
顶部