直接用SQL查询语句就可以了:
Dimstrc
Dimsnam1
DimServerName1
SetServerName1=HMIRuntime.Tags("@ServerName")
ServerName1.Read
snam1=ServerName1.Value
strc="Provider=SQLOLEDB.1;Password=3333;PersistSecurityInfo=True;UserID=sa;InitialCatalog=dbuser;DataSource="&snam1&"\WINCC"
dimcc1
Setcc1=CreateObject("adodb.connection")
cc1.ConnectionString=strc
cc1.CursorLocation=3
cc1.open
Dimrst
Setrst=CreateObject("adodb.recordset")
dimssql
ssql="ALARMVIEW:Select*fromalgviewchtWHEREDateTime>'-07-1515:30:00'andDateTime
ssql="Tag:R,'Archive_3\I_DB1DBD0','-07-1515:30:00','-07-1515:59:00'"''''查询归档数据
rst.Openssql,cc1
回答者:
mugui
-
中级工程师  第10级
-07-15 16:56:03
以下网友赞了您的问题:
功能
填写您的评论...
提问者对于答案的评价:
谢谢
暂无评论