I tried to use
OraclePreparedStatement and oracle.sql.CLOB bu it does not help.
Can anyone give me an example that insert a CLOB without SELECT. Thanks
SKC
Main Topics
Browse All TopicsPlease help. Whenever I insert a clob > 4k, I get an error message listed below:
-----
Oracle 9i (Release 2)
Java 1.4.1
-----
CREATE TABLE mytab (c CLOB);
-----
String s = a_very_long_string_30k_byt
Reader reader = new StringReader(s);
PreparedStatement pstmt = conn.prepareStatement
("INSERT INTO mytab (c) VALUES (?)");
pstmt.setCharacterStream(1
pstmt.execute();
pstmt.close();
conn.close();
-----
Error Messages:
Io exception: Connection reset
java.sql.SQLException: Io exception: Broken pipe
at oracle.jdbc.dbaccess.DBErr
at oracle.jdbc.dbaccess.DBErr
at oracle.jdbc.dbaccess.DBErr
at oracle.jdbc.driver.OracleS
at oracle.jdbc.driver.OracleP
at oracle.jdbc.driver.OracleP
at com.rawmart.itools.Import.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
checkout http://orafaq.net/msgboard
Cheers, Stefan
At last, I found out why my code does not work. Oracle said that if you want to use PreparedStatment.setCharac
BTW, thanks a lot for your comments.
skc
skc,
then ypwitkow in the first post was right, that was what he exactly told you.
... and in my link to http://orafaq.net/msgboard
please close the thread ..
Cheers,
Stefan
Business Accounts
Answer for Membership
by: ypwitkowPosted on 2002-11-22 at 04:50:33ID: 7483143
PreparedStatement methods have 4k limitation on CLOB. ples/gener ic/LobExam ple.java
Better use oracle.sql.CLOB class.
Examples in $ORACLE_HOME/jdbc/demo/sam
Best regards,
LW