发布于 2006-07-14 16:31:26
0楼
经过参考资料写出如下程序,VB中调试通过,但是在WINCC的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
大家好,很高兴和大家一起交流