Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Varchar(2000) -- Casting  RSS feed

 
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
Boost this thread!