Closed dwenking closed 7 months ago
This is by design. The spec says A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results.
Thanks for your kind response. I will close this issue since it is a feature.
The execution of an executeUpdate statement unexpectedly leads to the closure of a previously obtained ResultSet object. In the provided test case, a ResultSet object is obtained by calling getGeneratedKeys() on a Statement object after executing an UPDATE statement. This ResultSet is expected to remain open for subsequent operations. However, when another executeUpdate is executed on the same Statement object, the previously obtained ResultSet is found to be closed. The expected behavior is that executing an executeUpdate statement should not affect the state (open or closed) of a previously acquired ResultSet.