Hello Everyone,
I have a question on DB2 with java. Select * from mySchemaName.myTableName this is the query i am using to retrieve all the rows of the table.Now i don have any idea of the table .I dont know how many columns are there and how to retrieve the column values.
By using the following two methods ResultSetMetaData.getColumnName and ResultSetMetaData.getcolumnClassName() i am getting the column name and column data type in java.
Is there any way to get the values of the resultSet in a generic way.I mean ,to get each and every value in the result.I wanted to use ResultSet.getString() or ResultSet.getBoolean() based on the column type but before to that i have to check each and every columns data type and then use the respective methods.Is there any generic way with out checking the column data type we can retrieve the values.
I would really appreciate if some one can reply me.
Thanks in advance.
swati