• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get USE ORACLE LONG in java.

 
Fernando Dominguez
Ranch Hand
Posts: 108
Debian Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

How to get USE ORACLE LONG in java.

Oracle's LONG data type is a bigger string than varChar

when I try rs.getString("LONG_COLUMN") I get an SQL.exception stream has already been closed

Any idea, to get the value of the column ?

thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm assuming this is a legacy database? You would not normally use LONG data types these days, you would us a BLOB or CLOB as appropriate.

You need to treat LONGs as binary data, so you will need to use ResultSet.getBinaryStream() to read them. There used to be all sorts of gotchas in the Oracle driver handling LONG data so if you can use a C/BLOB it will save a lot of headaches.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic