aspose file tools
The moose likes JDBC and Relational Databases 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
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 19971
    
  25

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 - OCEJPAD 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: 19971
    
  25

I don't see the code I asked for...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Equivalent field for nclob in java