This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Equivalent field for nclob in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Equivalent field for nclob in java" Watch "Equivalent field for nclob in java" New topic
Author

Equivalent field for nclob in java

Nittin singla
Greenhorn

Joined: Jul 02, 2011
Posts: 24
I am using a field with data type nclob in oracle. what shall be its equivalent data type in java. while writing the field to the DB, I am getting character mismatch error using String.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

A CLOB is a "character large object". In other words, it can store large pieces of text. The n indicates that it uses Unicode. java.lang.String should be compatible. Can you show us the code that's setting the value?

I'll move this thread to our JDBC forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Nittin singla
Greenhorn

Joined: Jul 02, 2011
Posts: 24
I have taken a simple string variable in a POJO. I am setting it (Hard coding it to some default note).later on i am passing this as a parameter in the execute method..I am getting the character set mismatch(ORA-12704) error.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

I don't see the code I asked for...
 
Don't get me started about those stupid light bulbs.
 
subject: Equivalent field for nclob in java
 
Similar Threads
saving nclob data into database
problem saving the content of a file to a NClob column
storing NCLOB in oracle 9i
Retrieving NCLOB data
storing NCLOB in Oracle 9i