谢谢,我可能没有说明白,我用的是adotable连的数据库,里面有3个字段(id,name,status),datagrid中都全部显示出来的,我想循环读取status字段的值,用来判断其状态。我些的代码: for i:=0 to DBGrid1.RowCount - 1 do begin //读取status字段的值 showmessage(st); end;中间的就不知道怎么写了,谢谢各位帮忙看下
谢谢,我可能没有说明白,我用的是adotable连的数据库,里面有3个字段(id,name,status),datagrid中都全部显示出来的,我想循环读取status字段的值,用来判断其状态。我些的代码: for i:=0 to DBGrid1.RowCount - 1 do begin //读取status字段的值 showmessage(st); end; 中间的就不知道怎么写了,谢谢各位帮忙看下
谢谢,我可能没有说明白,我用的是adotable连的数据库,里面有3个字段(id,name,status),datagrid中都全部显示出来的,我想循环读取status字段的值,用来判断其状态。我些的代码: for i:=0 to DBGrid1.RowCount - 1 do begin //读取status字段的值 showmessage(st); end; 中间的就不知道怎么写了,谢谢各位帮忙看下
你的做法好像不对,应如下:adotable.firstwhile not adotable.eof do begin
temp:=dm.ADOQuery6.Fields.Fields[0].AsString;
for i:=0 to DBGrid1.RowCount - 1 do
begin
//读取status字段的值
showmessage(st);
end;中间的就不知道怎么写了,谢谢各位帮忙看下
for i:=0 to DBGrid1.RowCount - 1 do
begin
//读取status字段的值
showmessage(st);
end; 中间的就不知道怎么写了,谢谢各位帮忙看下
for i:=0 to DBGrid1.RowCount - 1 do
begin
//读取status字段的值
showmessage(st);
end; 中间的就不知道怎么写了,谢谢各位帮忙看下
begin
//读取status字段的值
str1:=adotable.fields[2].asstring; showmessage(str1); adotable.next;
end;