Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / February 2004

Tip: Looking for answers? Try searching our database.

Retrieving clob text and display in html page

Thread view: 
Tammy - 24 Feb 2004 00:30 GMT
Hello,
I need to retrieve a clob field from an oracle table, and display it
on a web application page. I'm currently receiving the error
"oracle.sql.CLOB@733122" where I'm expecting the text to display.

Can anyone help me please.

Thanks
Oscar kind - 24 Feb 2004 10:13 GMT
In comp.lang.java.databases Tammy <Tamara.Gallagher@blueshieldca.com> wrote:
> I need to retrieve a clob field from an oracle table, and display it
> on a web application page. I'm currently receiving the error
> "oracle.sql.CLOB@733122" where I'm expecting the text to display.

As I understand it, you have a oracle.sql.CLOB object. This object
doesn't have an implementation of tiString() to render its contents, so
the one inherited from Object is used. I assume however, that the object
implements java.sql.Clob (verify it yourself to be sure).

If that is the case, you can use use the method getCharacterStream() to
get a java.io.Reader to read the contents of the Clob. If the Clob doesn't
contain too much data (which is vague), you may instead want to use the
methods length() and getSubString(long, int) to get a String directly.

Oscar

Signature

Oscar Kind                                    http://home.hccnet.nl/okind/
Java/J2EE Developer                             email available on website



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.