Situation:
I have a database query to complete which will return a result set that I will then parse through and retrieve the values from the set.
I have created a class called "obQuery". As part of the constructor, I am generating the objects to create the query and then have created a method called "getResultSet", within the main class, that generates the "ResultSet" object from the SQL statement.
When I instantiate the "obQuery" object, I'd like to be able to retrieve the results of the ResultSet. I am lost though because, if I call the "getResultSet" method, that method has to know which SQL statement to run and the calling code does not know that value.
How can I create an empty ResultSet object and populate it with the output of the "getResultSet" code, without having to pass in the values to the method?