使用java程序update oracle 中 blob 字段
来源:互联网 发布:网络传销的基本特点是 编辑:程序博客网 时间:2024/06/04 18:04
String sql1 = "select f.editor_xml exml from t_sys_flow_info f where f.id in ("+infoId+") for update";
public void replaceXmlBySql(String sql,String fildName) throws SQLException, IOException {
public void replaceXmlBySql(String sql,String fildName) throws SQLException, IOException {
Connection conn = this.getConnection();
ResultSet rs = null;
Statement st = conn.createStatement();
rs = st.executeQuery(sql);
oracle.sql.BLOB blob = null;
while (rs.next()) {
blob = (oracle.sql.BLOB) rs.getBlob(fildName);
OutputStream outStream = blob.getBinaryOutputStream();
//得到原有的xml的String类型数据
String data = this.ConvertBLOBtoString(blob);
if(data.indexOf("backWrite")==-1){
data = data.replaceAll(",close'", ",backWrite,close'");
byte[] newData = data.getBytes();
outStream.write(newData, 0, newData.length);
}
outStream.flush();
outStream.close();
}
conn.commit();
conn.close();
st.close();
rs.close();
}
0 0
- 使用java程序update oracle 中 blob 字段
- JAVA读写Oracle中blob字段
- java读取oracle数据库中blob字段
- 使用java操作oracle的blob字段
- mysql中更新(update)blob字段
- java读写Oracle Blob字段
- java对oracle中blob字段的操作
- java向Oracle数据库中插入blob字段数据
- 使用JAVA读取ORACLE BLOB字段实现上传下载
- 在Java中使用Oracle blob
- 在Java中使用Oracle blob
- 在Java中使用Oracle blob
- ibatis+oracle blob类型字段insert update处理
- Java程序中使用oracle数据库LOB字段的总结
- oracle中读写blob字段的问题
- jdbc中如何处理Oracle BLOB字段
- jdbc中如何处理Oracle BLOB字段
- Oracle中BLOB字段的操作
- 无源晶振时钟计算
- 基于storm的wordCount
- 点击图片,背景音乐播放/停止,播放图标/静音图标随之更换
- Android Studio 配置系列(一):自定义代码注释
- JMS 之 ActiveMQ 第二篇
- 使用java程序update oracle 中 blob 字段
- android使用微信与支付宝支付在小米miui系统上ui线程被异常kill的bug修复
- http://www.cnblogs.com/simeone/p/4026173.html
- 矩阵的乘法
- 程序员面试题一
- Matlab中gradient函数的使用方法
- Android ListView工作原理完全解析,带你从源码的角度彻底理解
- VS+VisualGDB编译调试Linux程序
- /usr/bin/env: node: No such file or directory