简体   繁体   English

Eclipse和数据库给出不同的结果

[英]Eclipse and database giving different results

I have a large Java EE system connecting to an Oracle database via JDBC on Windows. 我有一个大型Java EE系统,该系统通过Windows上的JDBC连接到Oracle数据库。

I am debugging a piece of code that does a retrieval of a field from the database. 我正在调试一段从数据库中检索字段的代码。

The code is retrieving the field but when I run the exact same SELECT, copied from Eclipse, it does not yield any results. 代码正在检索字段,但是当我运行从Eclipse复制的完全相同的SELECT时,它不会产生任何结果。

Can any of you tell me why this would be the case? 谁能告诉我为什么会这样吗?

I'm at a loss.. 我很茫然。

One possible reason is that the application might see uncommited data which it just created, but not yet committed. 一种可能的原因是应用程序可能会看到刚创建但尚未提交的未提交数据。

When you execute the same statement in a different session it doesn't see the data (depending on your transaction isolation level ) 当您在不同的会话中执行同一条语句时,看不到数据(取决于您的事务隔离级别

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM