This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Equivalent field for nclob in java  RSS feed

 
Nittin singla
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21087
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nittin singla
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21087
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see the code I asked for...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!