Parvinder Arora

Greenhorn
+ Follow
since Aug 14, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Parvinder Arora

Hi,
The example is very simple
Following is the code

import java.sql.*;
class Employee
{
public static void main (String args [])
throws SQLException
{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
String url = "jdbc:oracle:oci8:@(description=(address_list=(address=(protocol=tcp)(port=1521)(host=192.168.5.115)))(connect_data=(sid=orcl1)))";
System.out.println(url);
Connection conn =
DriverManager.getConnection (url, "path", "path");
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select primary_email from member");
while (rset.next ())
System.out.println (rset.getString (1));
rset.close();
stmt.close();
conn.close();
}
}
The above code executes fine if the driver is a thin driver but doesnt executes using the oci driver

Originally posted by Robert Brunner:
Show me th code! (OK bad Jerry McGuire reference).
Seriously, problems are easiest to diagnose when you include some code.
R


It must be because for the reason that when the resultset is used before that statement must have been closed
hth
~Parvinder
Hi all ,
I am getting the following exception while connecting a sample application using JDBC-OCI driver

Exception in thread "main" java.lang.UnsatisfiedLinkError: do_open
at oracle.jdbc.oci8.OCIDBAccess.do_open(Native Method)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:198)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at Employee.main(Employee.java:28)

I have set the LD_LIBRARY_PATH containing the ocijdbc8.dll and classes12.zip is also in the CLASSPATH

Any clues as to why is this error ?

Thanks & Regards
~Parvinder