在VB6.0中如何逐行逐字段为DataGrid控件赋值
在VB6.0中如何逐行逐字段为DataGrid控件的各个单元格赋值,另外,请问能否为ADO数据集Recordset用代码添加一列。
[解决办法]
dim i as integer
dim j as integer
j=1
do while not rs.eof
with grid
for i=1 to rs.fields.count-1
.col=i
.row=j
.text=rs.fields(i)
next i
end with
rs.movenext
j=j+1
loop
可以