h3.JDBC Technology Code Samples
JDBC Technology is an API that lets you invoke SQL commands to create database tables, access the data stored in a table, and create and manage distributed transaction. Prior to J2SE 1.4, you have to download the javax.sql package for distributed transactions separately.
* [BatchUpdate.java|http://java.sun.com/docs/books/tutorial/jdbc/basics/examples/BatchUpdate.java] updates the database with a list of items using the {{PreparedStatement}} and {{CallableStatement}} classes. For supporting information see [The Java Tutorial: JDBC Basics|http://java.sun.com/docs/books/tutorial/jdbc/basics/]
* [CreateCoffees.java|http://java.sun.com/docs/books/tutorial/jdbc/basics/examples/CreateCoffees.java] creates a table named {{COFFEES}} with 5 fields. For supporting information see [The Java Tutorial: JDBC Basics|http://java.sun.com/docs/books/tutorial/jdbc/basics/]
* [MetaTest.java|http://java.sun.com/new2java/supplements/solutions/June02.html] connects to a database and displays information about the database and driver used to make the connection. For supporting information see [New to Java Programming Supplement, June 2002|http://java.sun.com/new2java/supplements/2002/June02.html].
* [OutputApplet.java|http://java.sun.com/docs/books/tutorial/jdbc/basics/examples/OutputApplet.java] is an applet version of the coffee application. For supporting information see [The Java Tutorial: JDBC Basics|http://java.sun.com/docs/books/tutorial/jdbc/basics/]
* [TransactionPairs.java|http://java.sun.com/docs/books/tutorial/jdbc/basics/examples/TransactionPairs.java] shows how to back out a transaction that posts to two different columns in the same table. For supporting information see [The Java Tutorial: JDBC Basics|http://java.sun.com/docs/books/tutorial/jdbc/basics/]
----
JDBC Technology is an API that lets you invoke SQL commands to create database tables, access the data stored in a table, and create and manage distributed transaction. Prior to J2SE 1.4, you have to download the javax.sql package for distributed transactions separately.
* [BatchUpdate.java|http://java.sun.com/docs/books/tutorial/jdbc/basics/examples/BatchUpdate.java] updates the database with a list of items using the {{PreparedStatement}} and {{CallableStatement}} classes. For supporting information see [The Java Tutorial: JDBC Basics|http://java.sun.com/docs/books/tutorial/jdbc/basics/]
* [CreateCoffees.java|http://java.sun.com/docs/books/tutorial/jdbc/basics/examples/CreateCoffees.java] creates a table named {{COFFEES}} with 5 fields. For supporting information see [The Java Tutorial: JDBC Basics|http://java.sun.com/docs/books/tutorial/jdbc/basics/]
* [MetaTest.java|http://java.sun.com/new2java/supplements/solutions/June02.html] connects to a database and displays information about the database and driver used to make the connection. For supporting information see [New to Java Programming Supplement, June 2002|http://java.sun.com/new2java/supplements/2002/June02.html].
* [OutputApplet.java|http://java.sun.com/docs/books/tutorial/jdbc/basics/examples/OutputApplet.java] is an applet version of the coffee application. For supporting information see [The Java Tutorial: JDBC Basics|http://java.sun.com/docs/books/tutorial/jdbc/basics/]
* [TransactionPairs.java|http://java.sun.com/docs/books/tutorial/jdbc/basics/examples/TransactionPairs.java] shows how to back out a transaction that posts to two different columns in the same table. For supporting information see [The Java Tutorial: JDBC Basics|http://java.sun.com/docs/books/tutorial/jdbc/basics/]
----