Basic HTML version of Foils prepared April 15 1997

Foil 5 JDBC 2 Tier Applet

From Examples of JDBC -- Microsoft Access CPS616 -- Information Track of CPS -- Spring Semester 97. by Sangeeta Aggarwal,Tom Pulikal,Udayan Pravate(Nancy McCracken) *

The SQL query is created and executed.
  • Syntax: PreparedStatement pstmt = conn.prepareStatement("select * from datatable where NAME = ?");
  • ResultSet rs = pstmt.executeQuery();
The data is read from the database and passed back to the applet where it is displayed.
At the end of the session, the connection to the database is closed.
  • Syntax: conn.close();



© 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 Aug 14 1997