752
社区成员
发帖
与我相关
我的任务
分享
CREATE OR REPLACE PROCEDURE T_OK
(
a in varchar2,
b in varchar2,
c in varchar2 ,
d out varchar2
)
AS
BEGIN
d:=a ||'/' || b || '/' || c;
END;
String ls_rtn_1 = " ",ls_rtn_2
string ls_a = "a" , ls_b = "b" , ls_c = "c"
Declare p_pro Procedure For T_OK(:ls_a , :ls_b , :ls_c , :ls_rtn_1);
Execute p_pro;
If sqlca.SQLCode <0 Then
MessageBox('错误',string(sqlca.sqlcode) +sqlca.SQLErrText)
Return
End If
Fetch p_pro Into :ls_rtn_2;
Close p_pro;
MessageBox( '提示',"存储过程返回:" +ls_rtn_2 )
Timestamp: 2015/6/24 20:08:10
BEGIN T_OK( 'a' , 'b' , 'c' , ' ' ,D=>:D); END;
Error occurred: [6550] (ORA-06550: line 1, column 15:
PLS-00306: wrong number or types of arguments in call to 'T_OK'
ORA-06550: line 1, column 15:
PL/SQL: Statement ignored
)
--------------------------------------------------------------------------------
Timestamp: 2015/6/24 20:09:49
commit
不知是否有人遇到过类似的问题
Given this procedure:
CREATE OR REPLACE PROCEDURE spu_edt_object(
o_id_object OUT NUMBER,
o_message OUT VARCHAR2,
a_id_object NUMBER,
a_param VARCHAR2 := NULL,
a_value VARCHAR2 := NULL
) as
begin
o_id_object := 12345;
o_message := 'Hello World';
end;
The DECLARE statement must use named notation because output parameters are defined to the left of input parameters:
dec{0} o_id_object, id_obiect = 54321
string o_message, param = 'Test'
DECLARE proc_update PROCEDURE FOR spu_edt_object (
a_id_object => :id_object,
a_param => :param
)
USING SQLCA;
EXECUTE proc_update;
if SQLCA.SqlCode 0 then
SQLCA.f_out_error()
RETURN -1
end if
FETCH proc_update INTO :o_id_object, o_message;
if SQLCA.SqlCode 0 then
SQLCA.f_out_error()
CLOSE proc_update;
RETURN -1
end if