OLE DB 读取数据库 实时错误 帮忙看下原因
Dim sPro As String
Dim sDsn As String
Dim sSer As String
Dim Scon As String
Dim Csql As String
Dim Conn As Object
Dim oRs As Object
Dim oCom As Object
Dim m, n, s
sPro = "Provider=WinCCOLEDBProvider.1;"
sDsn = ";Catalog=CC_WdlcWinc_11_07_21_23_14_18R;"
sSer = "DataSource=.\WinCC"
Scon = sPro + sDsn + sSer
Csql = "TAG:R,36,'0000-00-00 00:10:00.000','0000-00-00 00:00:00.000'"
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 = Csql
Set oRs = oCom.Execute ‘执行到此句 就出现 实时错误 -2147467259 80004005 未指定的错误
[解决办法]
感觉我像是火星人,一点也看不懂
[解决办法]
我看了,可我好意思说没看懂?
[解决办法]
确定看不懂!不容易啊