• Post Reply Bookmark Topic Watch Topic
  • New Topic

Retrieving NCLOB data  RSS feed

Kiran Kumar
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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());
java.io.BufferedReader is = new java.io.BufferedReader(clob.getCharacterStream());
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!