Earlier wrote:
. . .
As soon as their own example code,
gets to
rs.updateDouble( "age", newAge );
it throws
com.mysql.jdbc.NotUpdatable: Result Set not updatable (referenced
table has no primary keys). . . .

Well, it took me a bunch of digging, but I finally found out how to add a primary key to a MySQL database in SequelPro, so I could try the example again, and sure enough, it worked.

Too bad the tutorial didn't mention that little detail (or if it did, it buried it rather deeply). At least the webmaster apologized for the irate automated message issued by their board.

Interesting: at least in MySQL, JDBC won't let you have an updatable result set if the table doesn't have a primary key.

Once again, this whole business of database engines that don't even have a concept of RRNs is more than a little bit annoying.

I wonder what I will find when I finish the tutorial (and possibly others, like the one Mr. Gibbs recommended to me on the Java list) on MySQL, and go through it all again on DB2/400 . . . . ?


Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2015 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact