Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Varchar(2000) -- Casting

 
BillyBob Smith
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try to Cast a varchar(2000) to a string my code hangs...
Using
<code> String cb = (String)rs.getObject("column_name");
</code>
Thanx in advance
 
Julio Lopez
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to use a Clob object instead of a String and see if that works.
Clob c = rs.getClob("column_name");
String cb = c.getSubString(0, c.length());
Julio Lopez
M-Group Systems
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic