File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Can I set a column value in ResultSet and return Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Can I set a column value in ResultSet and return " Watch "Can I set a column value in ResultSet and return " New topic
Author

Can I set a column value in ResultSet and return

prash patil
Ranch Hand

Joined: May 26, 2008
Posts: 40
Hi All,

Can I modify the RESULTSET?
i.e. IF i Have one query Say
and It retuns me a column of type Clob.
If I want a String values instead of the Clob; then is it possible for me to get the same.

Thanks in advance.
PP
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29249
    
139

You can read the CLOB via an AsciiStream and store it in a string.

[edited to fix typo]


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Avyaya Avi
Greenhorn

Joined: Feb 04, 2009
Posts: 11
Patil, you can update the resultset and store the same in DB using ResultSet.updateXxxx() functionalities.

Or else, if you wish to store the clob values in a bean in a String form, you can do so by calling

someBean.setSisRec("ResultSet objects holding the column values");
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can I set a column value in ResultSet and return
 
Similar Threads
use of CLOB,help me.
lazy loading clob column
How to register a Clob in the dataBase
Question on update CLOB column when the column value is null
Converting a String to Clob for insert into DB