Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!