带参数存储过程调用

xler 2006-05-08 11:52:57
各位好:

目前碰到一个存储过程参数问题,(环境:oracle9i,java)
create or replace package BusVou as
--定义主单对象--
type bus_vou_record is record
(
.....
);
--定义明细单对象--
type vou_detail_record is record
(
...
);
--定义明细单数组--
type vou_detail_array is table of vou_detail_record index by binary_integer;
--定义存储过程--
procedure accountBusVou
(bus_vou_src in bus_vou_record ,vou_detail_src in vou_detail_array,
vou_detail_length in integer,result out string);
end BusVou;

现在要去调用包中的存储过程account(....),在pl-sql里面可以实现,因为
oracle 有record和table类型,但是如果外部调用,不知如何下手,谁对这方面
有经验,分享一下。
...全文
161 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
kingofworl 2006-05-13
  • 打赏
  • 举报
回复
call smpkg.UpdateScheduleRuleByGroupId

smpkg是包,后面的是包中过程
cuij7718 2006-05-12
  • 打赏
  • 举报
回复
groupScheduleRuleModel 是我定义的model
cuij7718 2006-05-12
  • 打赏
  • 举报
回复
UpdateScheduleRuleByGroupId 是你的存储过程的名称,只不过我的叫UpdateScheduleRuleByGroupId
会Java的蝈蝈 2006-05-12
  • 打赏
  • 举报
回复
没看懂楼上的代码!!!
groupScheduleRuleModel是什么啊?
cuij7718 2006-05-11
  • 打赏
  • 举报
回复
stmtCall = conn.prepareCall("{call smpkg.UpdateScheduleRuleByGroupId(?,?)}");
//stmtCall.registerOutParameter(1,Types.INTEGER);
stmtCall.setInt(1, groupScheduleRuleModel.getIgroup_id());
stmtCall.setString(2, groupScheduleRuleModel.getSchedulerule());
stmtCall.execute();
zclgod 2006-05-11
  • 打赏
  • 举报
回复
帮顶

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧