Basic HTML version of Foils prepared 7 October 97

Foil 50 Example - Using Weblogic's Oracle Driver -II

From Overview of JDBC and its use with Microsoft Access ARL Database Tutorial -- February 98. by Nancy McCracken(Sangetta Aggarwal, Udayan Parvate, Tom Pulikal)


//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() );



© on Mon Oct 13 1997