如何wincc中使用VBS脚本读写SQLServer数据库文件
set cn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.Recordset")
cn.Open "Provider=SQLOLEDB.1;Persist Security Info=False;data source=192.168.0.102;User ID=sa;Password=password;Initial Catalog=DBName"
rs.Open "select * from Qsoft", cn, 1,3
While Not (rs.EOF)
msgbox rs("ID")
rs.MoveNext
Wend
rs.Close
cn.Close