场景:

使用 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. Pytest权威教程21-API参考-06-变量及异常

    目录 特殊变量(Special Variables) collect_ignore collect_ignore_glob pytest_plugins pytest_mark PYTEST_DONT ...

  2. C 库函数 - strcspn()

    定义 size_t strcspn(const char *str1, const char *str2) 参数 str1 -- 要被检索的 C 字符串. str2 -- 该字符串包含了要在 str1 ...

  3. Kafka(一) —— 基本概念及使用

    一.安装&启动 安装Kafka(使用内置Zookeeper) 在Kafka官网下载安装包kafka_2.11-1.0.0.tgz #### 解压 tar zxvf kafka_2.11-1.0 ...

  4. 2018-2019-2 网络对抗技术 20165212 Exp 8 Web基础

    2018-2019-2 网络对抗技术 20165212 Exp 8 Web基础 原理与实践说明 1.实践内容概述 1.Web前端HTML 能正常安装.启停Apache.理解HTML,理解表单,理解GE ...

  5. linux设备树编译器DTC【转】

    本文转载自:https://blog.csdn.net/chenmiaowu88/article/details/54342823 参考文件: \kernel\Documentation\device ...

  6. I.MX6 dts 在哪里、怎么编译【转】

    本文转载自:https://blog.csdn.net/wangliang888888/article/details/78349224 一.参考文档: 1. [i.MX] 修改了dts之后,如何重新 ...

  7. HttpWebRequest Timeout

    随着REST风格的流行,直接通过 HttpWebRequest 进行服务调用的客户端应用越来越多.这里总结一些可能需要费时调查的经验,希望能帮助大家. 1. 用完的HttpWebRequest要Abo ...

  8. 快速克隆网站利器-teleport ultra

    快速克隆网站利器-teleport ultra 一.下载 二.操作步骤 第一步:打开这个软件 第二步点击file.下拉选择 New Project Wizred,弹出如下下拉框 这里我们使用第一个或者 ...

  9. nginx高级玩法之根据来源ip分流

    author :headsen chen date :   2019-08-15  16:37:05 notice :个人原创 需求:根据不同的请求的来源ip实现分流到不同的后端上去 方法一:1,在s ...

  10. Ionic4 Cordova 调用原生硬件 Api 实现扫码功能

    QR Scanner 速度快,样式随心所欲,默认只能扫二维码 https://ionicframework.com/docs/native/qr-scanner/ 安装插件 ionic cordova ...