Site Admin
Posts: 143
Joined: Fri Apr 27, 2007 6:52 pm
It bombs out at

rs.updateDouble( "age", newAge );

com.mysql.jdbc.NotUpdatable: Result Set not updatable (referenced table has no primary keys).This result set must come from a statement that was created with a result set type of ResultSet.CONCUR_UPDATABLE, the query must select only one table, can not use functions and must select all primary keys from that table. See the JDBC 2.1 API Specification, section 5.6 for more details.
at com.mysql.jdbc.UpdatableResultSet.generateStatements(
at com.mysql.jdbc.UpdatableResultSet.syncUpdate(
at com.mysql.jdbc.UpdatableResultSet.updateDouble(
at com.mysql.jdbc.UpdatableResultSet.updateDouble(


Postby hbquikcomjamesl » Sat Jan 26, 2013 3:36 am

Posts: 1
Joined: Sat Jan 26, 2013 1:53 am
(The above was posted on my behalf, after my own attempt somehow false-positived the spam-detector)

At any rate, I was eventually able to stick a primary key into the database (if the JDBC tutorial mentions anything about that, it's buried), after a fair amount of digging through the docs for both MySQL and SequelPro (you'd think they'd have been a bit more forward about how to do something so essential), and once I did, the tutorial worked just fine.

I wonder if I'm going to find the same situation when I go through the whole tutorial again with DB2/400 (a database engine that, unlike MySQL, does recognize the concept of RRNs).
James H. H. Lampert
Posts: 1
Joined: Fri May 17, 2013 2:09 am
Thanks. Figured out I was trying to get a ResultSet from the update results.. Code fixed now to use getMoreResults(), and wait for it to be true :)