Answer the question
In order to leave comments, you need to log in
Why does the data from the ResultSet disappear after the JDBC connection is closed?
There are connections - connection.
var statement=connection.createStatement();
var resultSet=statement.executeQuery(query);
resultSet.next()// will be true here;
statement.close();
resultSet.next()// here it will be false
I need to pass the data in the ResultSet format further, but connections can already be closed, why keep it open.
Answer the question
In order to leave comments, you need to log in
Because it will also be closed.
https://docs.oracle.com/javase/8/docs/api/java/sql...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question