• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I set a column value in ResultSet and return

 
prash patil
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Sheriff
Posts: 36031
432
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can read the CLOB via an AsciiStream and store it in a string.

[edited to fix typo]
 
Avyaya Avi
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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");
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!