大文本内容写入
用SQL语句直接写,会报错,ORA-01704:文字字符串过长
方法:用存储过程写
public int insertSubPopedom(CommonVO param , DBConnection dbConnection)throws EXPSQLException { Connection con = dbConnection.getConnection(); PreparedStatement ps = null; try{ com.exp.dao.dialect.Dialect dialect = dbConnection.getDialect(); if (dialect instanceof OracleDialect) { con.setAutoCommit(false); try{ ps = con.prepareStatement("insert into B_DATA_SUB_POPEDOM(ID,R_CODE, POPEDOM_LIST,TARGET_STATE,OTHER) values(SEQ_B_DATA_SUB_POPEDOM.nextval,?,?,?,?)"); ps.setString(1, param.getString("R_CODE")); ps.setString(2, param.getString("POPEDOM_LIST")); ps.setString(3, param.getString("TARGET_STATE")); ps.setString(4, param.getData("OTHER")); ps.executeUpdate(); ps.close();con.commit(); } catch (SQLException e) { con.rollback(); throw e; } } }catch (SQLException sqlE) { throw new EXPSQLException(sqlE); } finally { } return 0; //return this.biz.update("BaseDataLogic.subPopedom.insert",param); }