Basic HTML version of Foils prepared 4 Feb 98

Foil 19 JDBC 2 Tier Applet

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)

2 tier person database example for Foil 19
1 The SQL query is created and executed.
  • Syntax: PreparedStatement pstmt = conn.prepareStatement("select * from datatable where NAME = ?");
  • ResultSet rs = pstmt.executeQuery();
2 The data is read from the database and passed back to the applet where it is displayed.
3 At the end of the session, the connection to the database is closed.
  • Syntax: conn.close();
4 Look at complete example.

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