public void updateKpiStatus(String kpiStatus,String taskId){
Connection dbc=null;
Statement stmt=null;
PreparedStatement ps=null;
try {
dbc = new DBConn().getNewConnection();
//stmt = dbc.createStatement();
String sql=" update rm.thresholdcontent "
+" set kpi_status=?"
+" where id=? ";
ps=dbc.prepareStatement(sql);
java.io.Reader clobReader = new java.io.StringReader(kpiStatus); // 将 text转成流形式
ps.setCharacterStream(1, clobReader, kpiStatus.length());// 替换sql语句中的?
ps.setString(2, taskId);
ps.executeUpdate();
dbc.commit();
//stmt.execute(sql);
} catch (Exception e) {
e.printStackTrace();
}}
oracle 中数据类型为clob的编辑
最新推荐文章于 2024-04-12 09:57:11 发布