| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2606 人关注过本帖
标题:PB調用存储过程和接收返回值(新手一問)
只看楼主 加入收藏
abcabc123456
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2011-11-11
收藏
 问题点数:0 回复次数:0 
PB調用存储过程和接收返回值(新手一問)
//-----No.1
PROCEDURE 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 编辑 ]
搜索更多相关主题的帖子: message 
2011-11-11 12:10
快速回复:PB調用存储过程和接收返回值(新手一問)
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014453 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved