Chapter 11 Java Beans Programs

All these scripts and test data are available at www.quepublishing.com. Put 0789726718 in the search field.

 package beans; import java.sql.*; import oracle.jdbc.driver.*; import java.io.*; public class CarConnection { public static Connection getConnection() throws Exception { String driverClass = "oracle.jdbc.driver.OracleDriver"; String username = "scott"; String password = "tiger"; String dburl = "jdbc:oracle:thin:@localhost:1521:dto"; Driver d = (Driver)Class.forName(driverClass).newInstance(); return DriverManager.getConnection(dburl,username,password); } } package beans; import java.sql.*; import oracle.jdbc.driver.*; import java.io.*; public class CarGetCar extends Object { private int id = 0; private String ...

Get Oracle9i™ Development by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.