IBM Worklight - 如何使用“OUT”调用存储过程参数? [英] IBM Worklight - How to call a Stored Procedure with the "OUT" parameter?
问题描述
我们使用SQL适配器,并在调用存储过程时遇到以下错误。我们的数据库是Oracle 11g。下面是我们的适配器和程序。
We using a SQL adapter and I'm getting the below error while invoking the Stored Procedure. we Our database is Oracle 11g. Below is our adapter and procedures.
function deals(param) {
return WL.Server.invokeSQLStoredProcedure({
procedure : "deals_proc",
parameters : []
});
}
,程序是
create or replace procedure deals_proc(c1 out sys_refcursor ) AS
begin
open c1 for
select CATEGORYNAME from DEALS;
end deals_proc;
错误'我得到的是
{
"errors": [
"Runtime: Failed to retrieve data with procedure : deals_proc"
],
"info": [
],
"isSuccessful": false,
"warnings": [
]
}
在控制台错误消息中
Failed to retrieve data with procedure : deals_proc
FWLSE0101E: Caused by: [project Test]java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'DEALS_PROC'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
java.lang.RuntimeException: Failed to retrieve data with procedure : deals_proc
推荐答案
Worklight不支持 out
SQL适配器中的参数。请参阅此问题: IBM Worklight - 如何在调用存储过程时获取OUT参数?
Worklight does not support the out
parameter in SQL adapters. See this question: IBM Worklight - How to get OUT parameter when invoking a stored procedure?
我链接到你的问题也包含一个答案,如果你想尝试一下,提供一个精心的解决方法(基本上,覆盖Worklight并在Java代码中实现它。
The question I linked you to also contains an answer providing an elaborate workaround if you wish the try it (basically, override Worklight and implement it in Java code).
这篇关于IBM Worklight - 如何使用“OUT”调用存储过程参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!