Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> using Oracle's JDBC driver
Hi,
I am newbie to Oracle and I am trying to setup a JDBC connection
with the oracle database. Could anyone give me
any information how to do
that? I downloaded the Oracle JDBC driver from the oracle web site and
when I try the following program, I get error that says:
The dynamic link library ORA73.dll could not be found in the specified path.
G:\epgy>java test
java.lang.UnsatisfiedLinkError: no oci73jdbc in shared library path
at java.lang.Runtime.loadLibrary(Compiled Code) at java.lang.System.loadLibrary(System.java:561) at oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:138) at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:93) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:146) at java.sql.DriverManager.getConnection(Compiled Code) at java.sql.DriverManager.getConnection(DriverManager.java:126) at test.main(Compiled Code)
The sample program that I write is :
import java.sql.*;
class test{
public static void main (String args []) throws SQLException {
// Load Oracle driver
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
// Connect to the local database
Connection conn =
DriverManager.getConnection ("jdbc:oracle:oci7:@epgy", "oraserver",
"oraserver");
// Query the employee names
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select ename from emp");
// Print the name out
while (rset.next ())
System.out.println (rset.getString (1));
}
}
Thank you very much in advance for your help.
Anne Kwong Received on Fri Dec 11 1998 - 00:00:00 CST
![]() |
![]() |