wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes how to cast String to Clob ? 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 » Object Relational Mapping
Bookmark "how to cast String to Clob ?" Watch "how to cast String to Clob ?" New topic
Author

how to cast String to Clob ?

sylvester sinc
Greenhorn

Joined: May 22, 2008
Posts: 4
hi ,

anybody know how to cast a String datatype into Clob ?

I wanna get the data from a textarea and incert into a Clob data type

before that Im using 'String contents = ConvertUtils.convert(rules.getContent());' to cast the Clob into String but now I have no idea on how to convert this String to Clob.
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

"syl sc " please check your private messages for an important administrative matter.


SCJP, SCWCD.
|Asking Good Questions|
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Which ORM are you using?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
sylvester sinc
Greenhorn

Joined: May 22, 2008
Posts: 4
Hibernate
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9915
    
158

"syl sinc",

Everyone here, at JavaRanch, is more than willing to help you by answering your question(s). But we expect the ranchers to follow a couple of very simple rules, one of which is the naming policy. Your displayed name must consist of a first name (or an initial), a space, and a family name (in that order) and not be obviously fictitious. Please take a moment to change it, which you can do right here.


Thank you


[My Blog] [JavaRanch Journal]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9915
    
158

I haven't done this myself, but maybe this Hibernate documentation might help.
 
Consider Paul's rocket mass heater.
 
subject: how to cast String to Clob ?
 
Similar Threads
Clob and String
Java program to Convert java.lang.String to java.sql.CLOB Object
Mapping String To CLOB datatype using WSAD 4.0
insert CLOB into MS SQL Server 2K
Oracle clob?