I would like to extract the specified field again after displaying all the fields in a record.
The code is as follows:
============================
.......
while(rs.next()){
ps.println("<tr>");
for (int i=1; i<=nCols; i++) {
ps.println( "<td width=20%>" + rs.getString( i ) + "</td>");
}
}
//Extract the field again
String p = rs.getString(2);<---Why I can't get the value again???
double subtotal = q * (Double.valueOf(p).doubleValue());
ps.println("<td width=20%><font color = red>$" + subtotal + "</font></td>");
.......
.......
Thank you for your help!!