This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Just let me know. Can you able to store a string/file/stringbuffer as a clob? Then storing a Document is quite straigt forward. Looki into PreparedStatement setCLob() method. I am using this method extensively to store large amount of XML data.
regards, Ranjan ranjanbaisak at yahooo dot com
Joined: Nov 01, 2004
I was able to do it. That is from stringbuffer to a clob.
In the setClob method of PreparedStatement for the clob object can we pass the document object directly.
Will that work?
Please let me know.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Since java.sql.Clob does not have a method for dealing with XML Document objects, it appears to me that you will have to transform the Document to a stream of characters, or otherwise convert it to a String to use one of the Clob methods.