It's not a secret anymore!*
The moose likes JDBC 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
JavaRanch » Java Forums » Databases » JDBC
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: insertRow() working but the result of the insert is not visible in the Java application