要将clob类型字段插入Oracle,需要通过字符流进行处理,处理如下:
...
String fieldValue = "testClob,testClob,testClob,testClob,testClob";
// 转成流形式
Reader reader = new StringReader(fieldValue);
preparedStatement.setCharacterStream(1, reader, fieldValue.length());
...
要将clob类型字段插入Oracle,需要通过字符流进行处理,处理如下:
...
String fieldValue = "testClob,testClob,testClob,testClob,testClob";
// 转成流形式
Reader reader = new StringReader(fieldValue);
preparedStatement.setCharacterStream(1, reader, fieldValue.length());
...