The moose likes JDBC and Relational Databases and the fly likes Retrieving NCLOB data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Retrieving NCLOB data" Watch "Retrieving NCLOB data" New topic

Retrieving NCLOB data

Kiran Kumar
Ranch Hand

Joined: May 18, 2001
Posts: 107
when NCLOB data is retrieved and written to the System.out the data is not being printed properly.
the following is the code i am using.
ResultSet rs = c1.stmt.executeQuery("SELECT NLOBDATA FROM xxxxxx where id = 3353");
clob = (oracle.sql.CLOB)rs.getClob("NLOBDATA");
System.out.println("clob is " + clob.isNCLOB());
} is = new;
System.out.println("clob data is " + is.readLine());
when i run this code the output is
Am i doing the right thing here.
in SQL plus if i run the same query i get NLOBDATA as
i also tried using InputStreamReader instead of BufferedReader. but the output is different

i am using DB oracle and JDeveloper
thanks in advance.

Thanks<br /> <br />Kiran <br /> <br />SCEA, SCJP 1.4,<br /> <br />"First they ignore u, then they laugh at u, then they fight u, <br />then u will win<br /> <br />Mahatma Gandhi"
I agree. Here's the link:
subject: Retrieving NCLOB data
It's not a secret anymore!