I have a ResultSet that returns data of different types. The query is constructed dynamically so, at compile time, I don't know what type of value the query will return.
I have written the following code assuming that all results are Strings. But I want to get the type of each value too. How can I do this?
Below is the code I have written.
while (reportTable_rst.next()) {
String column = reportTable_rst.getString(columnIterator);
}
At this point, I would like to get the column type, and get the value according to the data type.