This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes insertRow() working but the result of the insert is not visible in the Java application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "insertRow() working but the result of the insert is not visible in the Java application" Watch "insertRow() working but the result of the insert is not visible in the Java application" New topic
Author

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

Steven Squeers
Ranch Hand

Joined: Aug 19, 2013
Posts: 62
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: insertRow() working but the result of the insert is not visible in the Java application
 
It's not a secret anymore!