Oracle Clob字段保存时提示字符串过长
来源:互联网 发布:图像分割算法有哪些 编辑:程序博客网 时间:2024/06/05 11:09
因为Oracle的SQL语句不能过长,大约4K限制,所以如果保存时Clob字段的内容过长的话会导致保存出错,提示"ORA-01704:文字字符串过长 "
我的解决方案是:
string ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings[""].ConnectionString;
// "Password=ncipds;User ID=ncipds;Data Source=ncIPDS;load balance timeout=1800;connection lifetime=1800;";//写连接串
OracleConnection Con = new OracleConnection(ConnectionString);//创建一个新连接
try
{
// 打开数据库连接
Con.Open();
OracleCommand cmd = new OracleCommand(cmdText, Con);
OracleParameter op = new OracleParameter("Content", OracleType.Clob);
op.Value = clobContent;
cmd.Parameters.Add(op);
cmd.ExecuteNonQuery();
}
catch (Exception objErr)
{
//ida.DoTransRollback();
throw new Exception(objErr.Message);
}
finally
{
Con.Close();
}
- Oracle Clob字段保存时提示字符串过长
- Oracle CLOB 字段插入时提示字符过长
- 如何处理CLOB字段值超过4000字节时提示:“ORA-01704:文字字符串过长”的错误
- 如何处理CLOB字段值超过4000字节时提示:“ORA-01704:文字字符串过长”的错误
- oracle JDBC 保存BLOB CLOB字段
- Oracle中将Clob字段转换成字符串
- 保存Clob字段问题
- Hibernate保存Oracle的Clob字段的解决方案
- oracle导入数据时出现字段过长
- oracle 修改 clob字段,查询clob字段
- ORACLE 操作 CLOB 字段
- oracle 更新clob字段
- oracle clob字段处理
- oracle 更新Clob字段
- ORACLE 操作 CLOB 字段
- ORACLE 操作 CLOB 字段
- ORACLE 操作 CLOB 字段
- Oracle利用SQL将clob字段数据转化为字符串
- CopyU! v2.0.377.207新版正式上线!
- 求逆序数之分治排序
- 小波变换网文精粹:小波变换教程(二十)
- 文档
- 单例模式 Singleton模式
- Oracle Clob字段保存时提示字符串过长
- Oracle Sql学习记录二
- 维护注册表
- (续)JAVA应用技术之编码规范(Eclipse checkstyle plugin)
- VSTO简介及发展
- C语言笔记2
- 浏览器的定制与扩展
- TDD应用试例(根据领域驱动模型设计的培训内容)
- 画虚拟矩形框(适合静态的)