成全高清免费完整观看,日韩一区二区三免费高清,欧美在线看欧美视频免费,日本无码专区无码二区

ucooper
級(jí)別: *
精華主題: * 篇
發(fā)帖數(shù)量: * 個(gè)
工控威望: * 點(diǎn)
下載積分: * 分
在線時(shí)間: (小時(shí))
注冊(cè)時(shí)間: *
最后登錄: *
查看ucooper的 主題 / 回貼
樓主  發(fā)表于: 2010-10-09 22:49
之前做項(xiàng)目的時(shí)候,查閱了大量資料,終于解決了將歸檔數(shù)據(jù)寫入listviews控件的功能,這里將我的代碼發(fā)出來以供參考。注意,里面的一些參數(shù)需要根據(jù)你的具體需要進(jìn)行修改。
本人還總結(jié)了一份技術(shù)文檔,由于這里不能上傳上傳文檔,請(qǐng)到我的個(gè)人博客里下載吧:
http://www.ucooper.com/wincc-summary.html

Sub  OnLButtonDown(ByVal  Item,  ByVal  Flags,  ByVal  x,  ByVal  y)
Dim  sPro,sDsn,sSer,sCon,sSql,oRs,conn,oCom,oItem,m,  n,  s,i,oList
sPro  =  "Provider=WinCCOLEDBProvider.1;"
sDsn  =  "Catalog=CC_tanks_09_07_14_10_38_56R;"
sSer  =  "Data  Source=.\WinCC"
sCon  =  sPro  +  sDsn  +  sSer
sSql  =  "TAG:R,'tanks\aa','2009-07-16  00:00:00','2009-07-17  00:00:00'"
MsgBox  "Open  with:"  &  vbCr  &  sCon  &  vbCr  &  sSql  &  vbCr
Set  conn  =  CreateObject("ADODB.Connection")
conn.ConnectionString  =  sCon
conn.CursorLocation  =  3
conn.Open
Set  oRs  =  CreateObject("ADODB.Recordset")
Set  oCom  =  CreateObject("ADODB.Command")
oCom.CommandType  =  1
Set  oCom.ActiveConnection  =  conn
oCom.CommandText  =  sSql
Set  oRs  =  oCom.Execute
n=oRs.RecordCount
MsgBox(n)
Set  oList  =  ScreenItems("控件1")
        oList.ListItems.Clear
        olist.ColumnHeaders.clear
        oList.View  =3    //顯示樣式,3為報(bào)表樣式
        oList.GridLines  =True    //顯示網(wǎng)格
        olist.ColumnHeaders.Add,  ,  CStr(oRs.Fields(0).Name),150
        oList.ColumnHeaders.Add,  ,  CStr(oRs.Fields(1).Name),150
        oList.ColumnHeaders.Add,  ,  CStr(oRs.Fields(2).Name),150
        oList.ColumnHeaders.Add,  ,  CStr(oRs.Fields(3).Name),150
        oList.ColumnHeaders.Add,  ,  CStr(oRs.Fields(4).Name),150
        'ListView1.ColumnHeaders.Add,  ,  CStr(oRs.Fields(3).Name),150    
        If(n>0)  Then
          oRs.MoveFirst
        End  If
        m  =  0
        Do  While  Not  oRs.EOF
                  m  =  m  +  1
                  Set  oItem  =  oList.ListItems.Add()
                        oItem.text=CStr(oRs.Fields(0).value)
                        '  oItem.SubItems(1)="bb"
                        '  oItem.SubItems(2)="cc"
                        oItem.SubItems(1)  =  CStr(DateAdd("h",  -8,oRs.Fields(1).value))
                        oItem.SubItems(2)  =  CStr(oRs.Fields(2).value)
                        oItem.SubItems(3)  =  CStr(oRs.Fields(3).value)                      
                        oItem.SubItems(4)  =  CStr(oRs.Fields(4).value)
                        '  oItem.Text  =  Left(CStr(oRs.Fields(1).Value),  23)
                        '  oItem.SubItems(1)  =  FormatNumber(oRs.Fields(2).Value,  4)
                        '  oItem.SubItems(2)  =  Hex(oRs.Fields(4).Value)
                          If  m  >  100  Then  
                                Exit  Do  
                            Else  
                          End  If
                          oRs.MoveNext
          Loop      
         MsgBox("wwwww")
oRs.Close
Set  oRs  =  Nothing
conn.Close
Set  conn  =  Nothing  
End  Sub

<sup id="t49uz"><pre id="t49uz"></pre></sup>
    <xmp id="t49uz"><sup id="t49uz"><pre id="t49uz"></pre></sup>
    <sup id="t49uz"><font id="t49uz"></font></sup>
    <sup id="t49uz"></sup>
    主站蜘蛛池模板: 久9视频这里只有精品试看| 日本学生特级牲交片| 欧美在线aⅴ无码| 沙田区| 日本不卡一卡二卡在线观看| 日本无遮掩裸身图片| JIZZJIZZ国产免费A片| 男男少年乖H调教跪趴SM视频| 欧美色插| 屯门区| A片试看50分钟做受视频 | 日本大胆人体艺术| 医生含着奶头边做H| 国产日本无码色情AⅤ免费看| 永安市| 圈养调教(粗口H)| 免费永久看黄神器| 奇台县| 人妻洗澡被强公日日澡电影| 三年片在线观看大全| 久久热在线视频| 成全在线观看免费完整版第二季| 久久精品一区二区免费播放| 德阳市| 日本免费播放av一区二区三区| 欧美gv完整版视频网站| 株洲市| 欧美性猛交xxxx乱大交3| 屏东县| 欧美a级毛欧美1级a大片式放| 贵阳市| 日本厕所间谍偷窥撒尿| 97伦伦午夜电影理伦片| 欧美性做爰又大又粗又长| 扎囊县| 各种姿势肉她H1V1| 欧美性色av性色在线观看| 龙州县| 和田县| 偷偷鲁2020精品**视频| 日产中文乱码字幕无线观看|