场景:

使用 Oracle.DataAccess.dll 访问数据库时,OracleDataAdapter 执行失败。

异常:

System.AccessViolationException was unhandled
  HResult=-2147467261
  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
  Source=Oracle.DataAccess

分析:

有问题的SQL
select distinct username from user u, role r where u.roleid = r.id and u.id = 1

正确的SQL
select distinct u.username from user u, role r where u.roleid = r.id and u.id = 1

总结:

规范使用 SQL 语法,指定表别名进行联合查询。

[SQL] - Attempted to read or write protected memory. This is often an indication that other memory is corrupt. 问题之解决的更多相关文章

  1. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt".

    昨天遇到一个比较奇怪的问题,运行VS2010调试程序的时候,总是会报一个错,然后程序就挂掉了:无可用源….,弹出一个窗口提示:System.AccessViolationException: Atte ...

  2. C#调用haskell遭遇Attempted to read or write protected memory

    1. Haskell的代码如下: 上面的代码中readMarkdown与writeHtmlString是pandoc中的函数,newString的作用是将String转换为IO CString. 2. ...

  3. c# 传递Null的string值导致的调用C++的dll报错 Attempted to read or write protected memory.

    c# 调用C++的dll报错 Attempted to read or write protected memory:   原因是:c# 传递Null的string值导致的,将Null改为string ...

  4. [错误]Caused by: org.apache.spark.memory.SparkOutOfMemoryError: Unable to acquire 65536 bytes of memory, got 0

    今天,在运行Spark SQL代码的时候,遇到了以下错误: Caused by: org.apache.spark.SparkException: Job aborted due to stage f ...

  5. Method and apparatus for training a memory signal via an error signal of a memory

    Described herein is a method and an apparatus for training a memory signal via an error signal of a ...

  6. malloc(50) 内存泄露 内存溢出 memory leak会最终会导致out of memory

    https://en.wikipedia.org/wiki/Memory_leak In computer science, a memory leak is a type of resource l ...

  7. sql server 2008 不允许保存更改,您所做的更改要求删除并重新创建以下表 的解决办法

    启动SQL Server 2008 Management Studio 工具菜单----选项----Designers(设计器)----阻止保存要求重新创建表的更改  取消勾选即可.

  8. (转)sql server 2008 不允许保存更改,您所做的更改要求删除并重新创建以下表 的解决办法

    启动SQL Server 2008 Management Studio 工具菜单----选项----Designers(设计器)----阻止保存要求重新创建表的更改  取消勾选即可.

  9. Sql server 账号被锁住:"the account is currently locked out. The system administrator can unlock it."的解决办法(转载)

    今天遇到的问题比较有意思.首先是很久没有打开测试数据库了,今天打开,使用service程序测试的时候出现下面的错误提示:Message: System.Data.SqlClient.SqlExcept ...

随机推荐

  1. Dns的作用

    DNS(Domain Name System,域名系统),万维网上作为域名和IP地址相互映射的一个分布式数据库,能够使用户更方便的访问互联网,而不用去记住能够被机器直接读取的IP数串 DNS系统:通过 ...

  2. VMware workstation虚拟机与真机之间复制文件

     首先选择导航栏的“虚拟机”选项,在下拉菜单中选择“安装VMware Tools” 弹出自动播放的选项,选择安装setup64.exe 开始安装VMware Tools,安装过程都保持默认即可,一直点 ...

  3. call 和 apply 方法

    1:每个函数都包含两个非继承而来的方法:call(),apply(). 2:call方法和apply方法作用是一样的. 下边是call的使用例子: window.color = 'red'; docu ...

  4. SignalR的几种方式_转自:https://www.cnblogs.com/zuowj/p/5674615.html

    SignalR有三种传输模式: LongLooping(长轮询). WebSocket(HTML5的WEB套接字). Forever Frame(隐藏框架的长请求连接), 可以在WEB客户端显式指定一 ...

  5. 浏览器并发数 network.http.max-connections

    network.http.max-connections https://bugs.chromium.org/p/chromium/issues/detail?id=12066 https://chr ...

  6. Oracle 查询表的索引包含的字段

    Oracle 查询表的索引包含的字段 select a.uniqueness 索引类型,b.index_name 索引名称,b.column_name 字段 from user_indexes a , ...

  7. 001 centos7下安装kibana

    Kibana是一个针对Elasticsearch的开源分析及可视化平台,用来搜索.查看交互存储在Elasticsearch索引中的数据. 所以,在安装完ES之后,这里再安装一下kibana.方便后面学 ...

  8. 写了一个具有future接口的rust测试代码

    写了一个具有future接口的rust测试代码 但没有实现future功能,内部是直接求值 struct Future<T> { t: T, } impl<T> Future& ...

  9. python的xpinyin模块:汉字转拼音

                            pypinyin 1.安装 pip install pypinyin 2.使用方法 >>> from pypinyin import ...

  10. qt操作excel報錯解決

    如果電腦上沒有office,需要判斷,否则,会报错 onecore\com\combase\catalog\catalog.cxx()\combase.dll!00007FFF1DF823CB: (c ...