Basic HTML version of Foils prepared May 19 99

Foil 44 JDBC Servlet Example (contd.)

From Overview of JDBC: Java Database Connectivity Basic Information Track Computational Science Course CPS616 -- Spring Semester 1999. by Nancy McCracken,(Sangetta Aggarwal, Meryem Ispirli, Udayan Parvate, Tom Pulikal, Chao-Wei Ou)

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



© 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 Mon Jul 5 1999