You can establish a database connection in pure JDBC code.
To code a JDBC Connection:
import
java.sql.*;
This statement is required for all JDBC
programming.
DriverManager.registerDriver (new
oracle.jdbc.driver.OracleDriver());
getConnection
methods:Connection conn =
DriverManager.getConnection(parameters...);
There are three driver manager getConnection
methods,
differing in the number and types of their parameters.
For more information, see the Oracle Database JDBC Developer's Guide
and Reference, available from the Oracle Database 10g
Documentation Library on the Oracle Technology Network (OTN) at
http://www.oracle.com/pls/db92/db92.homepage
.
Embedding SQL in Java Programs
with JDBC
Configuring Database
Connections
Registering a New Third-Party JDBC Driver
Connection Requirements for Oracle's Type 2 JDBC Drivers (OCI)
Copyright © 1997, 2004, Oracle. All rights reserved.