python使用cx_oracle调用存储过程的问题
oracle存储过程如下:procedureprocxxxxx(p_BeginDateinvarchar2,p_EndDateinvarchar2,p_Discloset...
oracle存储过程如下:
procedure procxxxxx(
p_BeginDate in varchar2,
p_EndDate in varchar2,
p_Disclosetype in number := null,
p_ProjectCode in varchar2 := null,
p_Discloseway in varchar2 :=
null,
p_startrow in number := 0,
p_endrow in number
:= 999999,
p_status in varchar2 := null,
p_returncount in
out number,
p_ReasonCode out varchar2,
p_ReasonInfo out
varchar2,
p_cursor out refcursor
);
db = cx_Oracle.connect("customer/customer@uat")
cursor =
db.cursor()
l_cur = cursor.var(cx_Oracle.CURSOR)
ReasonCode
='qqq'
ReasonInfo ='www'
resutlt=
cx_Oracle.Cursor.callproc("procxxxxx",[begindate,enddate,'','','','','','','',ReasonCode,ReasonInfo,l_cur])
提示
TypeError: descriptor 'callproc' requires a 'OracleCursor' object but
received a
'str'
照着案例改的,但是没改成功,哪位大神指导下,谢谢~! 展开
procedure procxxxxx(
p_BeginDate in varchar2,
p_EndDate in varchar2,
p_Disclosetype in number := null,
p_ProjectCode in varchar2 := null,
p_Discloseway in varchar2 :=
null,
p_startrow in number := 0,
p_endrow in number
:= 999999,
p_status in varchar2 := null,
p_returncount in
out number,
p_ReasonCode out varchar2,
p_ReasonInfo out
varchar2,
p_cursor out refcursor
);
db = cx_Oracle.connect("customer/customer@uat")
cursor =
db.cursor()
l_cur = cursor.var(cx_Oracle.CURSOR)
ReasonCode
='qqq'
ReasonInfo ='www'
resutlt=
cx_Oracle.Cursor.callproc("procxxxxx",[begindate,enddate,'','','','','','','',ReasonCode,ReasonInfo,l_cur])
提示
TypeError: descriptor 'callproc' requires a 'OracleCursor' object but
received a
'str'
照着案例改的,但是没改成功,哪位大神指导下,谢谢~! 展开
网易云信
2023-12-06 广告
2023-12-06 广告
UIkit是一套轻量级、模块化且易于使用的开源UI组件库,由YOOtheme团队开发。它提供了丰富的界面元素,包括按钮、表单、表格、对话框、滑块、下拉菜单、选项卡等等,适用于各种类型的网站和应用程序。UIkit还支持响应式设计,可以根据不同...
点击进入详情页
本回答由网易云信提供
2014-09-19
展开全部
TypeError 类型错误, callproc需要一个OracleCursor类但是接收到了一个'str'类
追问
怎么修改呢。。 不知道哪里出了语法问题
追答
可能是这句话:cx_Oracle.Cursor.callproc("procxxxxx",[begindate,enddate,'','','','','','','',ReasonCode,ReasonInfo,l_cur]) 具体该我也不清楚
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询