Insert XML with more than 4000 characters into a Oracle XMLTYPE column(将超过 4000 个字符的 XML 插入 Oracle XMLTYPE 列)
问题描述
我有一个 oracle 表,其中有一列来自SYS.XMLTYPE"类型的列和一个正在执行插入操作的存储过程:
I have an oracle table with a column from type "SYS.XMLTYPE" and a storage procudure which is doing the insert:
(短版):
PROCEDURE InsertXML
(
pXMLData IN LONG
)
IS
BEGIN
INSERT INTO MY_TABLE (XML_DATA) VALUES(pXMLData);
END InsertXML;
我从我的 C# 代码中调用这个 sp,类型为OracleType.LongVarChar".
I call this sp from my C# code with type "OracleType.LongVarChar".
现在的问题:如果 xml 的字符少于 4000 个,一切正常,但使用超过 4000 个字符的 xml 会出现以下错误:
Now the problem: If the xml has less than 4000 characters everything is working fine, but by using a xml with more than 4000 characters I get the following error:
ORA-20000: ORA-01461: can bind a LONG value only for insert into a LONG column
我该如何处理?谢谢 4 个答案
How can I handle this? Thx 4 answers
推荐答案
查看Oracle docs about XMLType
Check the Oracle docs about XMLType
另外,我认为数据类型应该是 CLOB(字符大对象).
Also, I believe the datatype should be a CLOB (Character Large Object).
这篇关于将超过 4000 个字符的 XML 插入 Oracle XMLTYPE 列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将超过 4000 个字符的 XML 插入 Oracle XMLTYPE 列
基础教程推荐
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 带更新的 sqlite CTE 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
