“0x7c910a19”处的指令引用“oxffffffff”处的内存。内存无法“读取”

时间:2011-01-07 09:38:57

标签: scheduled-tasks sql oracle vbscript

我有一个小问题,我在.vbs终止之前收到以下错误。我不知道为什么会抛出这个错误。以下是.vbs文件的过程:

Call ImportTransactions()
Call UpdateTransactions()

Function ImportTransactions()

  Dim objConnection, objCommand, objRecordset, strOracle
  Dim strSQL, objRecordsetInsert

  Set objConnection = CreateObject("ADODB.Connection")
  objConnection.Open "DSN=*****;UID=*****;PWD==*****;"
  Set objCommand = CreateObject("ADODB.Command")
  Set objRecordset = CreateObject("ADODB.Recordset")

  strOracle = "SELECT query here from Oracle database"

  objCommand.CommandText = strOracle
  objCommand.CommandType = 1
  objCommand.CommandTimeout = 0
  Set objCommand.ActiveConnection = objConnection
  objRecordset.cursorType = 0
  objRecordset.cursorlocation = 3  
  objRecordset.Open objCommand, , 1, 3

  If objRecordset.EOF = False Then
    Do Until objRecordset.EOF = True        
      strSQL = "INSERT query here into SQL database" 
      strSQL = Query(strSQL)
      Call RunSQL(strSQL, objRecordsetInsert, False, conTimeOut, conServer, conDatabase, conUsername, conPassword)
      objRecordset.MoveNext
    Loop
  End If

  objRecordset.Close()
  Set objRecordset = Nothing
  Set objRecordsetInsert = Nothing

End Function

Function UpdateTransactions()

  Dim strSQLUpdateVAT, strSQLUpdateCodes
  Dim objRecordsetVAT, objRecordsetUpdateCodes

  strSQLUpdateVAT = "UPDATE query here SET [value:costing output] = ([value:costing output] * -1)"
  Call RunSQL(strSQLUpdateVAT, objRecordsetVAT, False, conTimeOut, conServer, conDatabase, conUsername, conPassword) 

  strSQLUpdateCodes = "UPDATE query here SET [value:costing output] = ([value:costing output] * -1) different WHERE clause"
  Call RunSQL(strSQLUpdateCodes, objRecordsetUpdateCodes, False, conTimeOut, conServer, conDatabase, conUsername, conPassword)                 

  Set objRecordsetVAT = Nothing
  Set objRecordsetUpdateCodes = Nothing

End Function

它同时执行导入和更新,并且似乎抛出此错误。如果我注释掉ImportTransactions它不会抛出错误,但是我为另一个vbs文件生成了类似的代码,这不会抛出任何错误

提前感谢您的帮助,

克莱尔

0 个答案:

没有答案