File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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
 
 
subject: insert CLOB into MS SQL Server 2K