ResultSet rs = null;

Connection conn = new dbconn().getconnect();

Statement stmt = null;

int news=0;

              conn.setAutoCommit(false);

     stmt = conn.createStatement();

sql="update wx_active_t t set t.wx_plan_id="+plan_name+",t.active_code='"+active_code+"',t.active_content=empty_clob()  where t.id="+active_id;

    

     news= stmt.executeUpdate(sql);



  String sqlt="select active_content from wx_active_t  where id="+active_id+" for update ";



  rs = stmt.executeQuery(sqlt);

  if(rs.next())

  {

System.out.println(javautil.gb2iso(sContent));

oracle.sql.CLOB clob= (oracle.sql.CLOB)rs.getClob("active_content");

outStream = clob.getCharacterOutputStream();

char[] c = javautil.gb2iso(sContent).toCharArray();

outStream.write(c,0,c.length);

outStream.flush();

outStream.close();

conn.commit();

conn.close();

}

jsp里更新Clob类型字段数据的更多相关文章

  1. Java更新Oracle的clob类型字段

    Java更新Oracle的clob类型字段 1.查询该clob字段 2.处理该clob字段查询结果 3.更新该clob字段查询结果 1.查询该clob字段 <select id="se ...

  2. Spring JDBC处理CLOB类型字段

    以下示例将演示使用spring jdbc更新CLOB类型的字段值,即更新student表中的可用记录. student表的结构如下 - CREATE TABLE student( ID INT NOT ...

  3. 如何更新clob类型的内容

    一.手工测试流程: 1.测试需求(待执行用例) 2.标准化测试流程 1/5 --修改 result_info --用户风控信息表 select sysdate,t.*,t.rowid from fin ...

  4. Hibernate保存Blob和Clob类型的数据

    虽然非常不建议在数据库中保存Blob和Clob类型的数据,但真的要有这样的需求呢?这里记录一下使用Hibernate如何向数据库中保存Blob和Clob数据. Oracle和MySql在Blob类型上 ...

  5. 通过反射 往泛型Integer的集合里添加String 类型的数据 Day25

    package com.sxt.method1; import java.lang.reflect.Method; /* * 需求:通过反射 往泛型Integer的集合里添加String 类型的数据 ...

  6. jsp页面struts2标签展示clob类型的数据

    直接从数据库中查出来的数据,是clob类型的在前端页面展示的时候是这样: 后来找到了一个方法,在action中添加一个方法,解析转换clob数据的方法 public String getClob(Cl ...

  7. Java 存储和读取 oracle CLOB 类型字段的实用方法

    import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; import java.io.Str ...

  8. oracle中关于clob类型字段的查询效率问题

    今天,公司项目某个模块的导出报如下错误: HTTP Status 500 – Internal Server Error Type Exception Report Message Handler d ...

  9. .Net处理Oracle中Clob类型字段总结

    最近在做项目中用到Clob这个字段,Clob是存储无限长字符的Oracle字段,用的时候网上找资料找了好久,内容不是很多,大部分都不能用,当然也有可以用的,测试了不同版本,整理了一下,给大家在做项目的 ...

随机推荐

  1. 不同版本springboot上传文件大小设置

    参考原文:https://blog.csdn.net/awmw74520/article/details/70230591 Spring Boot 1.3.x或者之前 multipart.maxFil ...

  2. 嘴巴题5 「BZOJ1864」[ZJOI2006] 三色二叉树

    1864: [Zjoi2006]三色二叉树 Time Limit: 1 Sec Memory Limit: 64 MB Submit: 1195 Solved: 882 [Submit][Status ...

  3. 周期串Uva455 P37 3-4

    A character string is said to have period k if it can be formed by concatenating one or more repetit ...

  4. xcode下的DerivedData

    在模拟器运行的情况下经常会出现以下的错误: error: remove /Users/mac/Library/Developer/Xcode/DerivedData/YuQing-amkrrucjrn ...

  5. ie浏览器将网页转成pdf

    今天同事让我帮他将网页转成pdf,学了一个.先推荐一个超图的数据库使用指南:http://support.supermap.com.cn/DataWarehouse/WebDocHelp/6.1.1/ ...

  6. ajax返回后台编译时都对,返回error

    首先看看你的dataType:‘json’  类型是否与后台获取的类型一直.特别是json的格式对不对. 第二: 红括号里的有没有加

  7. Merge array and hash in ruby if key appears in array

    I have two arrays one = [1,2,3,4,5,6,7] and two = [{1=>'10'},{3=>'22'},{7=>'40'}] Two will ...

  8. python numpy.shape 和 numpy.reshape函数

    导入numpy模块   from numpy import *   import numpy as np ############################################### ...

  9. Luogu P1073 最优贸易(最短路)

    P1073 最优贸易 题意 题目描述 \(C\)国有\(n\)个大城市和\(m\)条道路,每条道路连接这\(n\)个城市中的某两个城市.任意两个城市之间最多只有一条道路直接相连.这\(m\)条道路中有 ...

  10. 20190818 [ B ]-½

    请看到这个蒟蒻博客的人注意一下. 这是简单的[ B ]场考试,如果需要[ A ]场题解请去神犇们的blog. [ B ]场不需要题解,恩? 太蒟蒻了QAQ 考试过程: 怀着我是蒟蒻我怕谁的心情. 首先 ...