Wednesday, December 5, 2001 08:21 AM
If you are a registered user of Oracle Tech Net you can reference the documentation at Oracle8i Application Developer's Guide - Large Objects (LOBs)
Release 2 (8.1.6)
. If not you must first register at OTN Home Page
before prceeding to the the docs. You will find in the Oracle documentation examples of both writting and reading CLOBs to and from the DB where the general mechanics will be create a row in your table using the PL/SQL function empty_clob() ro empty_blob() to populate the row with a valid LOB locator then to SELECT .. FOR UPDATE the locator form that row for modification.
In the recent question Labled blob
you will find an example class source that demostrates the uploading of a file to a blob column in a fairly generic fashion, you could use the same basic maechanics by modifing the blob refs to clob, changing the setBinaryStream to setAsciiStream, of course modifing the connect mechanics to line up with your Oracle DB.NOTES:java.sql.Connection.setAutoCommit(false)Handle abstract ResultSet elements involving piece-wise trasactions before other elements, if you do not the IO streams will be implictly closedLOBs require special handling.
If you require a more specific assistance with your particular circumstances, show an example of the code producing the error and the error text generated and would be happy to try to help.