On 05/02/2022 20:10, Rick Hillegas wrote:
I don't think you need the FOR UPDATE clause. The following simpler code
works for me:
try (Statement updatable =
conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE))
{
try (ResultSet rs = updatable.executeQuery(SELECT_ALL))
{
while(rs.next())
{
rs.updateInt(1, 10 * rs.getInt(1));
rs.updateRow();
}
}
What if you want to update just one specific row? Can you use the same
technique for that?
-- John English
