Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • 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
Marshal
Posts: 34837
369
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");
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic