//result set or hit list is obtained after |
// executing the query |
//and using a cursor it is displayed |
ResultSet rs = stmt.getResultSet ( ); |
while (rs.next () ) { |
System.out.println( rs.getString(1) + "-" + |
rs.getString(2) + "-" + rs.getString(3) ); |
} |
//get the metadata using the result set |
ResultSetMetaData rsmd = rs.getMetaData (); |
System.out.println("Number of Columns:" |
+ rsmd.getColumnCount() ); |