[SQL] - Attempted to read or write protected memory. This is often an indication that other memory i

Posted Hello World!

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[SQL] - Attempted to read or write protected memory. This is often an indication that other memory i相关的知识,希望对你有一定的参考价值。

场景:

使用 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 i的主要内容,如果未能解决你的问题,请参考以下文章

关于c3p0 ResourcePoolException: Attempted to use a closed or broken resource pool

Attempted to serialize java.lang.Class: org.hibernate.proxy.HibernateProxy. Forgot to register a typ

ubuntu 升级后无法启动,attempted to kill init

安装intel xtu 遇到"Attempted to install on an unsupported platform"

问题 Kernel panic – not syncing: Attempted to kill init

Kernel panic - not syncing: Attempted to kill init