Forums Register Login

Problem to display clob data

+Pie Number of slices to send: Send
Hello,

Oracle version is: 11.2, jdk7 and tomcat apache-tomcat-6.0.18
I am facing problem to retriew record from database. my code is as follow:


The record exists for desc2 but the above code output is "null" for desc2 whereas I checked on SQL prompt and its working fine.


I also called only desc2 column and its displaying ok.


My table structure is:

I stuck here. Please help me

Best regards
+Pie Number of slices to send: Send
Farakh,
You state that the data type for column DESC2 in table NEWSARTICLES is CLOB.
In that case I believe you must change the following line of your java code:

to this:

Good Luck,
Avi.
+Pie Number of slices to send: Send
Thanks Avi Abrami I tried and now it displaying:


Best regards
+Pie Number of slices to send: Send
If you'd check the methods in java.sql.Clob you'd see one that returns a String. It takes two parameters, the start and end of the substring. If you provide 0 and clob.length() that will get you the entire text.
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2575 times.
Similar Threads
Search Query Problem
inserting a sequence value to the table
JSP attendance management project error
Oracle JDBC Thin Client behaviour concerning date data types and it's format.
Refcursor value is invalid, Bigger type length than Maximum, Protocol violation
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:54:34.