There is a non closed ResultSet in while cycle which can leads into error: You can't operate on a closed ResultSet!!!.
tested working.
There is a non closed ResultSet in while cycle which can leads into error: You can't operate on a closed ResultSet!!!.