“0x7c910a19"处的指令在“oxffffffff"处引用内存.无法“读取"内存 [英] The instruction at "0x7c910a19" referenced memory at "oxffffffff". The memory could not be "read"

查看:51
本文介绍了“0x7c910a19"处的指令在“oxffffffff"处引用内存.无法“读取"内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

0x7c910a19"处的指令引用了oxffffffff"处的内存.无法读取"内存

The instruction at "0x7c910a19" referenced memory at "oxffffffff". The memory could not be "read"

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

I have a small issue, I receive the error above before the .vbs terminates. I don't know why this error is thrown. Below is the process of the .vbs file:

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

UDPATE:如果我在打开连接后退出函数(见下文),它仍然会导致相同的错误.

UDPATE: If I exit the function after I open the connection (see below) it still causes the same error.

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")
  Exit Function

End Function

它同时执行导入和更新,并且似乎在之后抛出此错误.

It does both the import and update and seems to throw this error after.

在此先感谢您的帮助,

克莱尔

推荐答案

以下修复对我有用:我创建了一个 .bat 文件并添加了以下行 cscript vbsFile.vbs

The following fix worked for me: I created a .bat file and added the following line cscript vbsFile.vbs

这篇关于“0x7c910a19"处的指令在“oxffffffff"处引用内存.无法“读取"内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆