Basic HTML version of Foils prepared 4 Feb 98

Foil 42 JDBC Servlet Example (contd.)

From Overview of JDBC and its use with CORBA or Java RMI CPS616 Technologies of Information Age -- Spring 1998. by Nancy McCracken(Sangetta Aggarwal, Udayan Parvate, Tom Pulikal)

Suns servlet database example for Foil 42
1 private void dispResultSet(ResultSet rs, PrintStream out)
2 throws SQLException {
3 //get the resultset metadata from the result set
4 ResultSetMetaData rsmd = rs.getMetaData();
5 //get the # of columns in the table and display the results
6 while (rs.next() ) {
7 for (int I;I <= numcols; I++) {
8 //display the values for each column
9 }
10 }
11 }
12 Show this example with an HTML page interface.

in Table To:


© 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 Sun Nov 29 1998