This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes How do I write a String to a java.sql.Clob Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How do I write a String to a java.sql.Clob" Watch "How do I write a String to a java.sql.Clob" New topic
Author

How do I write a String to a java.sql.Clob

Joseph Urbanek
Greenhorn

Joined: Sep 17, 2003
Posts: 3
How do I write a String to a java.sql.Clob, without using oracle.sql.CLOB and using java version 1.3.1
Tim Morrow
Greenhorn

Joined: Sep 17, 2003
Posts: 11
As I recall, Java 1.3.1 supports only JDBC 2.0 which doesn't provide a mechanism for creating a clob, only reading them.
Unfortunately you will have to use oracle.sql.CLOB.getCharacterOutputStream() to get a writer that will allow you to write to your clob.
Java 1.4 includes JDBC 3.0 which does provide Clob.setCharacterStream().
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/LOBSample/Readme.html


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I write a String to a java.sql.Clob
 
Similar Threads
Java program to Convert java.lang.String to java.sql.CLOB Object
Converting Java String to Oracle Clob.
CLOB ClassCastException
How to insert CLOB object into DB?
How to convert "java.sql.Blob" object to "java.sql.Clob" object?