* GREY=local LOCAL HTML version of Foils prepared 13 March 1997

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

From Overview of Java Database Connection Basic Information Technology Course CPS616 -- Spring Semester 1997. by Udayan Parvate, Tom Pulikal (Geoffrey C. Fox) *

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

Table Font Size


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Jul 22 1997