Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

insertRow() working but the result of the insert is not visible in the Java application

 
Steven Squeers
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have the following simple program, which successfully inserts a row into table T:



The problem is, the insert is not visible in the Java program. When I query the db, it's there, but inside the Java program, it isn't. In the example provided in the book that I'm using the inserted data is visible when the resultSet is printed out after the insert. They are using mySQL; I'm using Oracle.

My output is:

Before the insert:
X
10
Row not inserted
After the insert:
X
10

But querying the db:

ORCL> select * from t;

X
----------
10
1000


Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic