By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,941 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,941 IT Pros & Developers. It's quick & easy.

Invoking overloaded Stored Procedures

P: 2
I have following procedures on Oracle database sever,

Procedure_one (Number, String)
Procedure_one (Number, String, Boolean)
Procedure_one (Number, String, Boolean, String)

It appears that I can not call first and second one from above due to some sort of limitation. I am getting following exception from database server.

exceptions.ValueError  not enough arguments

When I call the very last one I am getting different exception, I am not sure what is going on here but wondering if one could explain it to me.

dco2.DatabaseError 
(6550, "ORA-06550: line 1, column 8:\nPLS-00306: wrong number or types of arguments in call to 'Procedure_one\nORA-06550: line 1, column 8:\nPL/SQL: Statement ignored")

Here is how above stored Procedures are being called from python


================================================== ================================================== =========================

try:

proc = "Procedure_one"
cursor = self.cursor()
ret = cursor.callproc(proc, 123456, 'one' , 1, 'two')

except exceptions.ValueError, e:
print e

except dco2.DatabaseError, e:
print e

except:
etype = sys.exc_type
print etype


Thanks in advance!
Mar 13 '08 #1
Share this Question
Share on Google+
1 Reply


P: 2
Is there any workaround? I am using python2.3 and it appears that I am running into this limitation because python2.3 does not support function overloading.

Any pointer would be appreciated. Thanks
Mar 19 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.