Hey everyone, I am stuck on a little problem that I cant seem to figure out.
I'm writing a program to add, update and remove from a mySQL database. I would like to return my ResultSet in my data access class to my GUI class to display the data.
But the returned resultset always seems to be empty..
You should never pass connection, statement or resultset outside the block where they are been obtained. You should always acquire AND close them all in the shortest possible scope. If you want to return the results from the query, then you need to map the resultset to a collection of model objects (javabeans, DTO's, VO's, POJO's, or whatever you want to call it).