[求助]ORA-06550的问题,怎么解决_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
2
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 2026 | 回复: 1   主题: [求助]ORA-06550的问题,怎么解决        上一篇   下一篇 
Leah
注册用户
等级:列兵
经验:82
发帖:1
精华:0
注册:2016-10-3
状态:离线
发送短消息息给Leah 加好友    发送短消息息给Leah 发消息
发表于: IP:您无权察看 2019-9-18 14:26:08 | [全部帖] [楼主帖] 楼主

建一张表,用它来存储XML文档.

1、建表:

create table TEST_XMLTYPE
(
VAR XMLTYPE
);


2、建目录:

create or replace directory MYFILE
as 'g:\file';


且保证g:\file下面有一个simple.xml文件。

3、创建存储过程

create or replace procedure prc_test_xmltype(p_path varchar2,p_file varchar2)
is
v_file bfile;
v_xml xmltype;
v_clob clob;
begin
v_clob:=empty_clob();
v_file:=bfilename(p_path,p_file);
dbms_lob.fileopen(v_file,dbms_lob.file_readonly);
dbms_lob.loadfromfile(v_clob,v_file,dbms_lob.getlength(v_file));
dbms_lob.fileclose(v_file);
v_xml:=xmltype.createXML(v_clob);
insert into test_xmltype(var) values(v_xml);
commit;
end prc_test_xmltype;


4、存储过程运行没有问题,但当我执行时,却报错了。

SQL> exec prc_test_xmltype;
begin prc_test_xmltype; end;


ORA-06550: 第 1 行, 第 7 列: 

PLS-00306: 调用 'PRC_TEST_XMLTYPE' 时参数个数或类型错误

ORA-06550: 第 1 行, 第 7 列: 

PL/SQL: Statement ignored


请问是什么原因,帮忙解决一下。谢谢。 




赞(0)    操作        顶端 
联动大白
注册用户
等级:列兵
经验:91
发帖:0
精华:0
注册:2015-5-27
状态:离线
发送短消息息给联动大白 加好友    发送短消息息给联动大白 发消息
发表于: IP:您无权察看 2019-11-8 0:30:00 | [全部帖] [楼主帖] 2  楼

为了方便大家阅读,我对文章中错误号来解释一下吧!

Error Id: ORA-06550

Title: line string, column string: string

Description:

line string, column string: string

Action:

none

Cause:

Usually a PL/SQL compilation error.


Error Id: PLS-00306

Title: wrong number or types of arguments in call to ’string’

Description:

wrong number or types of arguments in call to ’string’

Action:

Check the spelling and declaration of the subprogram name. Also confirm that its call is correct, its parameters are of the right datatype, and, if it is not a built-in function, that its declaration is placed correctly in the block structure.

Cause:

This error occurs when the named subprogram call cannot be matched to any declaration for that subprogram name. The subprogram name might be misspelled, a parameter might have the wrong datatype, the declaration might be faulty, or the declaration might be placed incorrectly in the block structure. For example, this error occurs if the built-in square root function SQRT is called with a misspelled name or with a parameter of the wrong datatype.


也许你已明白,但对一个人有用也是我存在的理由!^_^ By:持之以恒的大白

-- 来自: 北京联动北方科技有限公司



赞(0)    操作        顶端 
总帖数
2
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论