home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VCafe / ddetour.bin / ConnectionManager1.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-03-19  |  1.2 KB  |  29 lines

  1. import java.sql.SQLException;
  2. import symantec.itools.db.beans.jdbc.ConnectionManager;
  3. import symantec.itools.db.beans.jdbc.JdbcConnection;
  4.  
  5. public class ConnectionManager1 extends ConnectionManager {
  6.    static JdbcConnection jdbcConnection1;
  7.  
  8.    public ConnectionManager1() {
  9.       this.init();
  10.    }
  11.  
  12.    public void init() {
  13.       jdbcConnection1 = new JdbcConnection();
  14.       jdbcConnection1.setIdentifier("jdbcConnection1");
  15.       jdbcConnection1.setURL("jdbc:dbaw://localhost:8889/Tutorial");
  16.       jdbcConnection1.setUserName("dba");
  17.       jdbcConnection1.setPassword("sql");
  18.  
  19.       try {
  20.          jdbcConnection1.setReadOnly(false);
  21.       } catch (SQLException e) {
  22.          System.out.println(((Throwable)e).getMessage());
  23.          return;
  24.       }
  25.  
  26.       ((ConnectionManager)this).add(jdbcConnection1);
  27.    }
  28. }
  29.