PB調用存储过程和接收返回值(新手一問)
//-----No.1PROCEDURE sp_test (
in_user_no IN NUMBER,
);
END;
//-----No.2
PROCEDURE sp_test (
in_user_no IN NUMBER,
iv_rtn OUT VARCHAR2
);
END;
//---------PB
long ln_user
string lv_rtn =space(100)
//DECLARE sp_testing PROCEDURE FOR test.sp_test(:ln_user)using sqlca;
DECLARE sp_testing PROCEDURE FOR test.sp_test(:ln_user, :lv_rtn)using sqlca;
EXECUTE sp_testing;
FETCH sp_testing INTO :lv_rtn;
messagebox('lv_rtn', lv_rtn)
close sp_testing;
If I try to call store procedure without return value in PB(same as No1.Store Procedure), PB can call the Store procedure successfully.
If I try to call store procedure with return value in PB(same as No2.Store Procedure), PB cannot call the Store procedure. I try to use the sqlcode and sqlerrortext to debug the problem.
The error is show as below:
EXECUTE sp_testing; <----- PLS-00306: wrong number or types of arguments in call xxxxxxxxx
FETCH sp_testing INTO :lv_rtn; <---- Cursor is not open
[ 本帖最后由 abcabc123456 于 2011-11-11 12:13 编辑 ]