File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Joseph Urbanek
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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().
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic