VB中LISTVIEW的用法
发布网友
发布时间:2022-04-23 17:31
我来回答
共1个回答
热心网友
时间:2022-04-23 19:00
数据库中的数据用ado取
dim rs as new adodb.recordset
rs.open sql,cnn
dim cols as integer ,col as integer
cols=rs.fields.count
do until rs.eof
dim itm as new listviewitem
itm.text=rs(0)
for col = 1 to cols-1
itm.subitems(col)=rs(col) & ""
next
listview1.items.add itm
rs.movenext
loop
rs.close