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 how to write clob into oracle database using jdbc? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to write clob into oracle database using jdbc?" Watch "how to write clob into oracle database using jdbc?" New topic
Author

how to write clob into oracle database using jdbc?

Ravi Tej Pidatala
Greenhorn

Joined: Jan 29, 2012
Posts: 14
Hello , I am trying to write clob into oracle table .

java.sql.SQLException: ORA-01704: string literal too long
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)

How can i insert a String whose size is more than 4000 characters into database ?
Ravi Tej Pidatala
Greenhorn

Joined: Jan 29, 2012
Posts: 14


I actually fund a solution to it . It could be done using OraclePreparedStatement.
http://rocksolutions.wordpress.com/2010/06/07/handling-clobs-made-easy-with-oracle-jdbc-10g/. Just letting my question remain , in case it could help someone.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to write clob into oracle database using jdbc?