Re: How to connect Java application with Oracle Database using JDBC?



DRS.Usenet@xxxxxxxxxxxxxxxx wrote:
public OracleConnection connect() throws Exception {
String connectString =
"jdbc:oracle:thin:@some.server.name:someportnumber:somedatabasename";
OracleDriver driver = new OracleDriver();
driver = null;
Class.forName ("oracle.jdbc.driver.OracleDriver");
con = (OracleConnection)
DriverManager.getConnection(connectString,userid, password);
con.setAutoCommit(false);
return con;
}

You need to find a copy of classes12.jar.

Make that ojdbc14.jar at a minimum. ojdbc5.jar and ojdbc6.jar are also available.

<http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_111060.html>

It's not good to recommend obsolete tech.

--
Lew

.