Is there any way to get ResultSet's values dynamically? here is the code below to make my question clear.
while(rsltSet.next()) { arr[i][0] = rsltSet.getInt(1)+""; arr[i][1] = rsltSet.getInt(2)+""; arr[i][2] = rsltSet.getString(3)+""; arr[i][3] = rsltSet.getString(4)+""; arr[i][4] = rsltSet.getString(5)+""; } I tried to use code below in a for loop, it gave me an exception which I cannot get the detail of.
for(int j=1;j<columnCount;j++) arr[i][j] = rslt2.getObject(j)+""; How can I get the values of ResultSet without specifyinh whether it is integer or string or date?