try {
Class.forName("oracle.jdbc.driver.OracleDriver");
// Set the connection properties
Properties dbProps = new Properties();
dbProps.put("user", "libra");
dbProps.put("password", "banana");
// dbProps.put("server", "dev1");
// Get the connection from the pool
Connection conn =
DriverManager.getConnection("jdbc:oracle:thin:@tarazed.hbs.edu:1525:dev1", dbProps);
Statement s = conn.createStatement();
s.executeUpdate("insert into profile (name) values ('Jim')");
s.close();
conn.close();
}
catch (ClassNotFoundException cnfe) {
System.out.println("Failed to load JDBC drivers.");
cnfe.printStackTrace();
}
catch (Exception e) {
e.printStackTrace();
}