场景:

使用 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. D2. Remove the Substring (hard version)(思维 )

    D2. Remove the Substring (hard version) time limit per test 2 seconds memory limit per test 256 mega ...

  2. jQuery学习笔记——基本了解

    安装 两种方法: 从 jquery.com 下载jQuery. 从 CDN 中载入 jQuery, 如从我的博客中加载 jQuery: <script src="https://blo ...

  3. CEF3开发者系列之Cookies管理和共享<转>

    原帖地址:https://www.cnblogs.com/guolixiucai/p/6994559.html 涉及网页登录相关的技术,Cookies肯定是忽略不了的.由于项目的需要,要做一个双核的产 ...

  4. 【maven】在pom.xml中引入对json-lib的依赖dependency

    <dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</art ...

  5. 微信小程序不同机型的兼容布局解决

    因为小程序是以微信为平台运行的,可以同时运行在android与ios的设备上,所以不可避免的会遇到布局适配问题,特别是在iphone5上,因为屏幕尺寸小的缘故,也是适配问题最多的机型,下面就简单介绍几 ...

  6. Java基础 Scanner 使用nextInt接收整数

        JDK :OpenJDK-11      OS :CentOS 7.6.1810      IDE :Eclipse 2019‑03 typesetting :Markdown   code ...

  7. centos7设置rsyslog日志服务集中服务器

    centos7设置rsyslog日志服务集中服务器 环境:centos6.9_x86_64,自带的rsyslog版本是7.4.7,很多配置都不支持,于是进行升级后配置 # 安装新版本的rsyslog程 ...

  8. 【转载】 clusterdata-2011-2 谷歌集群数据分析(二)--task_usage

    原文地址: https://blog.csdn.net/yangss123/article/details/78298749 由于原文声明其原创文章不得允许不可转载,故这里没有转载其正文内容. --- ...

  9. no match for call to ‘(std::__cxx11::string {aka std::__cxx11::basic_string

    问题: t->package().ship_id(sqlRow[1]);其中 ship_id为 结构体package中的string类型.如下: typedef struct Package{  ...

  10. Spring cloud微服务安全实战-6-6jwt改造之日志及错误处理(2)

    第一次请求失败了 打印出了403,第二次更新成功 现在只处理了403这种情况,还有一种情况就是401,就是当前用户需要做身份认证,你没有做身份认证. 401的处理 与403类似,也是在这里配置.Ent ...