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