ktm5124
ktm5124

Reputation: 12123

Java ResultSet: Does the DB only update if updateRow is called?

In java.sql.ResulSet, can the updateObject, updateString, update[Type] methods update the underlying database without a call to updateRow()?

Thanks,
ktm

Upvotes: 0

Views: 702

Answers (1)

Harry Joy
Harry Joy

Reputation: 59660

When a ResultSet object is created with update capability, you can call updateXXX() methods to update column values to prepare for calling updateRow() or insertRow() method store the updated row or a new row to the target table.

So updateXXX() methods do not update without call to updateRow().

Hope this helps.

Upvotes: 3

Related Questions