【发布时间】:2013-05-21 18:32:53
【问题描述】:
你们能告诉我如何使用 jdbc 插入 clob 数据吗?我正在使用oracle10g数据库。
我能够使用以下 2 种方法插入长度
1.
tempClob.length()<4000){
pstmnt.setClob(colNumber, tempClob );
}
2.
tempClob.length()<4000){
Reader reader =tempClob.getCharacterStream();
pstmnt.setClob(colNumber, tempClob );
pstmnt.setCharacterStream(colNumber, reader, new Long(tempClob.length()).intValue());
}
当 clob 数据的长度很大时,例如 abt 29k,这两种方法都会失败。
【问题讨论】:
-
他们为什么会失败?你有例外吗?
标签: java oracle jdbc oracle10g clob