场景:

使用 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. C++2.0新特性(一)——<特性认知、__cplusplus宏开启、Variadic Templates 、左右值区分>

    一.新特性介绍 2.0新特性包含了C++11和C++14的部分 1.2 启用测试c++11功能 C++ 标准特定版本的支持,/Zc:__cplusplus 编译器选项启用 __cplusplus 预处 ...

  2. avalon在公共页面里面写的功能,怎么让某些页面不引用到这个方法和html?

    每一个页面都用用到head.html里面的东西,但是有些页面我不想调用这个js,但是在head.html我已经调用了怎么办? 比如我是这个页面不需要去调用  https://*******/mytry ...

  3. fluent中interpolate的用法

    原视频下载地址: https://pan.baidu.com/s/1hTD6tIlYL1S0nm30riAD9w 密码: ngv9

  4. VirtualAlloc加载shellcode免杀一点记录

    一个很好的学习网站 推荐一下: https://docs.microsoft.com/zh-cn/windows/win32/api/ 0x01 VirtualAlloc VirtualAlloc: ...

  5. 三大框架 之 Hibernate查询(一对多、多对多、查询关系)

    目录 一对多 表之间关系 表之间关系建表原则 一对多关系配置 建立表 建立ORM 添加配置文件 在hibernate.cfg.xml中的标签里,添加核心配置文件 引入工具类 编写测试类 级联操作 什么 ...

  6. Vue 使用axios分片上传

    Vue的界面 <input type="file"/> 上传方法 fileUpload: function () { var num = 1 var file = do ...

  7. win7 激活码 秘钥

    019.06最新windows7旗舰版系统激活码: 目前市面上的win7旗舰版激活码大部分都已经过期或失效了,下面来分享一些最新的. win7旗舰版激活密钥: BG2KW-D62DF-P4HY6-6J ...

  8. Navicat Premium 12 mysql show error: connection is being used

    错误原因:连接数满了. 解决方案:杀掉无用连接,释放资源.

  9. springMVC Controller 参数映射

    springMVC 对参数为null或参数不为null的处理 - 小浩子的博客 - CSDN博客https://blog.csdn.net/change_on/article/details/7664 ...

  10. leetcode 361.Bomb Enemy(lintcode 553. Bomb Enemy)

    dp 分别计算从左到右.从右到左.从上到下.从下到上4个方向可能的值,然后计算所有为‘0’的地方的4个方向的值的最大值 https://www.cnblogs.com/grandyang/p/5599 ...