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 insert CLOB into MS SQL Server 2K 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 "insert CLOB into MS SQL Server 2K" Watch "insert CLOB into MS SQL Server 2K" New topic
Author

insert CLOB into MS SQL Server 2K

Dave Bosky
Ranch Hand

Joined: Dec 16, 2003
Posts: 72
I have a large textarea field in a form field called details.

I get the textarea field value like so:
String details= request.getParameter("details");

But I need to convert the string datatype to CLOB datatype
so I can insert the data into a CLOB field.

Can I cast this somehow?

Thanks,
Dave
Natarajan Shankar
Ranch Hand

Joined: Jun 10, 2004
Posts: 53
For CLOB/ BLOB data-type you need to open stream of the data-typoes and write the information through the stream. As I known, direct casting is not possible through API level.


Best Regards<br />N.Shankar<br />SCJP, SCWCD
Dave Bosky
Ranch Hand

Joined: Dec 16, 2003
Posts: 72
Could you provide a simple example of creating the required stream?

Thanks,
Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: insert CLOB into MS SQL Server 2K
 
Similar Threads
Converting a String to Clob for insert into DB
use of CLOB,help me.
help: lock problem during Clob update
how to cast String to Clob ?
use of CLOB