Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Retrieving data from NCLOB
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");
while(rs.next())
{
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());
rs.close();
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
"ZZZZZZZZZZZZjZ┐ZZZZZZZZZZ"
i also tried using InputStreamReader instead of BufferedReader. but
the output is different
"[C_at_8"
i am using DB oracle 9.2.0.1 and JDeveloper 9.0.2.7.97 and also the JDBC driver which comes with the DB 9.2.0.1 is in the classpath.
thanks in advance. Received on Wed Apr 02 2003 - 23:15:22 CST
![]() |
![]() |