如何在WINCC的VBS中将数据存入ORACLE数据库,如下代码在VB中调试通过,但在VBS中却不起作用,请指点。
Dim objConnection
Dim strConnectionString
Dim strSQL
Dim objCommand
strConnectionString = "Provider=OraOLEDB.Oracle.1;Password=dc;Persist Security Info=True;User ID=dc;Data Source=sddc"
strSQL = "delete dc1"
Set objConnection = CreateObject("ADODB.Connection")
objConnection.ConnectionString = strConnectionString
objConnection.Open
Set objRecordset = CreateObject("ADODB.Recordset")
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandText = strSQL
Set objRecordset = objCommand.Execute
objConnection.Close