我正在调用ColdFusion2016中用Oracle 11g编写的过程。自昨天以来我一直在调试失败,有点帮助表示赞赏。我不知道这个错误是由于我的oracle过程还是Coldfusion造成的,所以我通过从我的oracle sql开发人员调用该过程做了一些测试:
variable x refcursor;
variable y varchar2(200);
variable z varchar2(200);
exec um_check_alloc_bene_loadv2(v_session_id => 1, v_summary => :y, v_continue => :z, cv_1 => :x );
print x;
print y;
print z;
这给我一些结果。所以,我的假设是错误必须归因于ColdFusion调用。但我看不出我的电话有什么问题:
<cfstoredproc procedure="um_check_alloc_bene_loadV2" datasource="#Trim(TESTDB)#">
<cfprocparam type="in" cfsqltype="cf_SQL_INTEGER" variable="session_id" value="#Trim(max_session_id)#" MAXLENGTH="4">
<cfprocparam type="out" cfsqltype="CF_SQL_VARCHAR" variable="summary" value="">
<cfprocparam type="out" cfsqltype="CF_SQL_VARCHAR" variable="continue" value="">
<cfprocresult name="errors" resultset="1">
</cfstoredproc>
程序的开头如下:
create or replace PROCEDURE um_check_alloc_bene_loadV2 (
v_session_id IN NUMBER DEFAULT NULL,
v_summary OUT VARCHAR2 /* DEFAULT ' '*/
,
v_continue OUT VARCHAR2 /* DEFAULT ' '*/
,
cv_1 IN OUT SYS_REFCURSOR)
AS
v_rowcount NUMBER (10, 0);
v_errorcount NUMBER (5, 0);
BEGIN
-- clean errors
UPDATE um_allocation_beneficiary_ldV2
SET errors = ' '
WHERE session_id = v_session_id;
当我从ColdFusion中调用此proc时,我得到了一个我无法弄清楚的错误:
Error Executing Database Query.
[Macromedia][Oracle JDBC Driver][Oracle]ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to
'UM_CHECK_ALLOC_BENE_LOADV2' ORA-06550: line 1, column 7: PL/SQL: Statement
ignored
........................................
138 : <cfprocparam type="out" cfsqltype="CF_SQL_VARCHAR"
variable="summary" value="">
139 : <cfprocparam type="out" cfsqltype="CF_SQL_VARCHAR"
variable="continue" value="">
140 : <cfprocresult name="errors" resultset="1">
141 : </cfstoredproc>
142 : <table align="center" width="90%">
SQLSTATE HY000
DATASOURCE TESTDB
VENDORERRORCODE 6550
SQL {call um_check_alloc_bene_loadV2( (param 1) , (param 2) , (param 3) )}
Resources:
答案 0 :(得分:2)
您的程序需要四个参数,例如下面但只传递三个参数。感谢。
PROCEDURE um_check_alloc_bene_loadV2 (
v_session_id ,
v_summary ,
v_continue ,
cv_1 )