标题:求改一下代碼
取消只看楼主
w327555162
Rank: 2
等 级:论坛游民
帖 子:45
专家分:43
注 册:2011-1-4
结帖率:85.71%
已结贴  问题点数:6 回复次数:0 
求改一下代碼
Set rs = New ADODB.Recordset
rs.Open sql, conn, 1, 3
For i = 0 To rs.Fields.Count - 1
k = rs(i).Name
Set colx = ListView1.ColumnHeaders.Add()
    colx.Text = k
    colx.Width = ListView1.Width / rs.Fields.Count
Next
ListView1.ListItems.Clear
For c = 0 To rs.Fields.Count - 1
rs.MoveFirst
Set itmx = ListView1.ListItems.Add()
j = rs(c)
itmx = j
Next
Set rs = Nothing
這個代碼查詢的結果在ListView1中顯示到到一列中去了,我要橫向到8個例中對應顯示
搜索更多相关主题的帖子: sql 
2012-01-10 10:26



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-359453-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.325850 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved