- 浏览: 1342063 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (551)
- 计划 (4)
- java (115)
- oracle (60)
- ajax (3)
- javascript (64)
- 计算机操作技巧集 (11)
- 近期关注话题 (10)
- 随想 (13)
- html (6)
- struts (15)
- hibernate (16)
- spring (2)
- game (0)
- Eglish (10)
- DisplayTag (6)
- jsp (18)
- css (3)
- eclipse (3)
- 其他知识 (8)
- 备用1 (12)
- 备用2 (1)
- 笑话-放松心情 (9)
- 设计 (1)
- 设计模式 (1)
- 数据结构 (0)
- office办公软件 (5)
- webwork (0)
- tomcat (2)
- MySql (1)
- 我的链接资源 (5)
- xml (2)
- servlet (0)
- PHP (13)
- DOM (0)
- 网页画图vml,canvas (1)
- 协议 (2)
- 健康 (3)
- 书籍下载 (1)
- jbpm (1)
- EXT (1)
- 自考 (2)
- 报表 (4)
- 生活 (64)
- 操作系统基础知识 (2)
- 测试 (2)
- guice (1)
- google学习 (2)
- Erlang (1)
- LOG4J (2)
- wicket (1)
- 考研 (1)
- 法律 (1)
- 地震 (1)
- 易学-等等相关 (1)
- 音乐 (1)
- 建站 (4)
- 分享说 (3)
- 购物省钱 (0)
- linux (1)
最新评论
-
zenmshuo:
如果使用SpreadJS这一类的表格工具,应该能更好的实现这些 ...
js中excel的用法 -
hjhj2991708:
第一个已经使用不了
jar包查询网站 非常好用! -
jiangmeiwei:
...
中文乱码 我的总结 不断更新 -
gary_bu:
...
response.sendRedirect 中文乱码问题解决 -
hnez:
多谢指点,怎么调试也不通,原来我在<body>&l ...
ExtJs IE ownerDocument.createRange() 错误解决方案
用jdbc 或者 hibernate
http://www.weste.net/2004/11-3/12250047377.html
oracle 10g 处理clob
http://blog.csdn.net/fenglibing/archive/2006/04/19/669476.aspx
好的文章
http://www.herongyang.com/jdbc/Oracle-CLOB-setClob.html
解决实例:
http://forum.java.sun.com/thread.jspa?threadID=349880&messageID=2778347
onvert String to CLOB and Insert into Oracle database
Jan 23, 2003 4:59 AM
Click to email this message
Hi,
I spent some time working on this, and I thought I would share it within the forum. This solution is unique to Oracle, so consider it's use carefully. It's the simplest coding I could come up with, and I have been able to insert Strings of any length using this technique with both the oci8 and thin driver when executed using Java 1.4 and Oracle 9.2. No guarantees that it will work for you. Let me know if it helps you out.
http://www.weste.net/2004/11-3/12250047377.html
oracle 10g 处理clob
http://blog.csdn.net/fenglibing/archive/2006/04/19/669476.aspx
好的文章
http://www.herongyang.com/jdbc/Oracle-CLOB-setClob.html
解决实例:
http://forum.java.sun.com/thread.jspa?threadID=349880&messageID=2778347
onvert String to CLOB and Insert into Oracle database
Jan 23, 2003 4:59 AM
Click to email this message
Hi,
I spent some time working on this, and I thought I would share it within the forum. This solution is unique to Oracle, so consider it's use carefully. It's the simplest coding I could come up with, and I have been able to insert Strings of any length using this technique with both the oci8 and thin driver when executed using Java 1.4 and Oracle 9.2. No guarantees that it will work for you. Let me know if it helps you out.
import java.sql.*; import java.util.*; import java.text.*; /* ------------------------------------------------------------------- * This program demonstrates a technique for converting a large String * to an oracle.sql.CLOB then inserting that CLOB into a database. * I believe most of this is specific to Oracle, specifically the * ability to create a temporary CLOB within your program. * ------------------------------------------------------------------- */ class TestOraCLobInsert { public static void main (String args []) throws SQLException { try { DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@server:1521:sid", "uid", "pwd"); PreparedStatement ps = conn.prepareStatement("INSERT INTO CLOBTABLE VALUES (?)"); oracle.sql.CLOB newClob = oracle.sql.CLOB.createTemporary(conn, false, oracle.sql.CLOB.DURATION_CALL); newClob.putString(1,"This string, up to 4 gigabytes will be inserted into the CLOB"); ps.setClob(1, newClob); int rowcnt = ps.executeUpdate(); System.out.println("Successful update of "+rowcnt+" row"); ps.close(); conn.close(); } catch (Exception e) { System.out.println("Java Exception caught, error message="+e.getMessage()); } } }
发表评论
-
oracle删除重复记录
2009-07-16 11:16 1163有困难,找猪八戒 Q:要删除一张表中的重复记录,但是要保留一条 ... -
db2 express-c 安装后检查及安装例子数据库
2009-02-27 17:07 3358摘自http://publib.boulder.ibm.com ... -
问:如何得到与WEB-INF同级目录下的配置文件
2008-09-23 08:35 2095Q: 有如下需求:需要从WEB-INF同级的目录下读取配 ... -
讨论如何优化这条sql
2008-09-11 16:33 1573SELECT * FROM ( ... -
N Vs Exist in SQL
2008-07-02 16:39 1362N Vs Exist in SQL 原文如下: http:// ... -
SQL 指南
2008-05-27 11:45 1013http://www.sql-tutorial.com/ -
orace 分析函数
2008-05-26 09:08 1161select x.num, sum(x.num) over ( ... -
oralce tutoial 指南
2008-03-22 14:21 977http://www.exforsys.com/tutoria ... -
查找部分字段重复的记录 ORACLE Identifying duplicate rows
2008-03-13 08:49 1926http://www.jlcomp.demon.co.uk/f ... -
oracle 资源网站
2008-01-12 11:42 1840oracle alter table table_ ... -
Top 5 Oracle Reference Books 前5本 oracle 参考书
2008-01-12 11:24 1682http://databases.about.com/od/o ... -
Oracle与DB2、MySQL取前10条记录的对比<转>
2008-01-11 16:46 2194原文:http://tech.ccidnet.com/art/ ... -
expert on e on one oracle - Thomas Kyte 读书笔记
2008-01-11 10:17 2073=============================== ... -
oracle 资源 整体理解oralce 比较好 英文网
2008-01-09 16:59 1151http://www.adp-gmbh.ch/ora/admi ... -
pl/sql 应用之一
2007-12-12 17:21 1086declare begin insert into x ... -
init.ora文件所在目录
2007-12-12 15:58 2088Oracle安装盘:\oracle\admin\DB名称\pf ... -
[Oracle] 如何解决ORA-04031 错误
2007-12-12 15:53 3202[Oracle] 如何解决ORA-04031 ... -
oracle faq 常见问题解答 http://www.orafaq.com/
2007-12-12 13:34 1444The Oracle FAQ http://www.oraf ... -
oracle 快速参考
2007-12-12 09:58 1056http://www.psoug.org/library.ht ... -
oracle like
2007-12-12 09:18 3377http://www.adp-gmbh.ch/ora/sql/ ...
相关推荐
向Oracle数据库插入Clob大段文本解决方法
Oracle如何插入CLOB字段值,附件为简单的示例代码。Oracle如何插入CLOB字段值,附件为简单的示例代码。
java操作oracle clob,基础教程,教你clob在java中的用法,简单易学。
hibernate存取oracle的clob
运用Java如何存取Oracle中的CLOB类型字段
oracle Blob转换Clob
把oracle数据库中字段类型为clob的字段值以字符串的形式读取出来
ORACLE中CLOB字段转String类型
java读取oracle数据库中clob字段 把oracle数据库中字段类型为clob的字段值以字符串的形式读取出来
java操作oracle clob,基础教程,教你clob在java中的用法,简单易学。
JDBC读写Oracle的CLOB字段
简单写的一个小工具,把图片存入oracle中,按clob和blob两种方式存储,并读取图片
关于Oracle的 Clob数据类型在Hibernate中的应用小结
Oracle导出Clob,Blob等大字段工具,自己写的工具,方便大家下载使用
Oracle导出Clob,Blob工具 ,支持导出CLob工具版本2,解决上个版本导出时间有问题的bug
NULL 博文链接:https://shihuan830619.iteye.com/blog/1662937
weblogic下转换oracle 的clob类型经常报转型错误,本例子通过反射解决weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB转型成oracle.sql.CLOB问题