Getgeneratedkeys Returns An Empty Resultset
In one sentence: Statement.getGeneratedKeys() is occasionally returning an empty ResultSet, and I'm trying to figure out why. Background: I am keeping track of users' requests rega
Solution 1:
I posted this question to IIUG, and the response I got there pointed to a bug in Informix (APAR IC98247), fixed in a version later than the one I am using.
The solution I'm trying now, recommended by a friend in the same predicament, is to read the request_id from the row just inserted by variation of
SELECT max(request_id) from Header where order_id = ${orderId} ;
// Avoid race condition, accidentally reading the last row inserted by// another thread.This seems to have worked for him.
Post a Comment for "Getgeneratedkeys Returns An Empty Resultset"