May 2001
Intermediate to advanced
1088 pages
30h 13m
English
Listing 3.1 shows a simple JDBC query program. The database used for this example is the Cloudscape database, a 100% pure Java database available from http://www.cloudscape.com. The program puts together the various concepts you have already seen in this chapter.
package usingj2ee.jdbc; import java.sql.*; public class SimpleQuery { public static void main(String[] args) { try { // Make sure the DriverManager knows about the driver Class.forName("COM.cloudscape.core.JDBCDriver"); // Create a connection to the database Connection conn = DriverManager.getConnection( "jdbc:cloudscape:j2eebook"); // Create a statement Statement stmt = conn.createStatement(); // Execute ... |
Read now
Unlock full access