Sometimes I have to query database while reading from a ResultSet
. Is there a way to check, for a given Statement
instance, if it is occupied with a ResultSet
or not?
EDIT:
After reading @MarkRotteveel comment, I change my question from Connection
to Statement
.
He suggests that this is not possible and not a good practice either. So should I create a Statement
for every query? And why I can't do this check on a Statement
?