Basic HTML version of Foils prepared 23 June 1997

Foil 10 Statement 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)


Use connection to send SQL statements to database: Statement stmt = conn.createStatement( ); ResultSet rs = stmt.executeQuery("select * from table1"); The return value of the method executeQuery is a single result set.
The method executeUpdate is used for
  • insert, update and delete statements, which return no. of rows affected by change
  • DDL statements such as create table, drop table, . . .
The method execute is used for SQL statements that may return more than one result set or update count.



© 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