Basic HTML version of Foils prepared 23 June 1997

Foil 11 ResultSet class

From Overview of JDBC and its use with Microsoft Access UC Web Applications Certificate -- June 26 97. by Nancy McCracken(Sangetta Aggarwal, Udayan Parvate, Tom Pulikal)


1 A ResultSet contains all the rows which satisfied the conditions of an SQL statement.
2 The cursor of a ResultSet is initially pointed to the first row, the method next( ) moves the cursor down one row. ResultSet r = stmt.executeQuery("select a,b,c from table1"); while (r.next( )) { //print values for current row int i = r.getInt("a"); float f = r.getFloat("b"); String s = r.getString("c"); System.out.println("row" + i + f + s); }

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 Thu Jan 8 1998