[DB-SIG] create procedure / callproc question

Anthony Tuininga anthony@computronix.com
Wed, 04 Sep 2002 20:38:08 -0600


Oh, one other thing: in Oracle, the create statement succeeds just fine
but there may be compilation errors which you need to check in
user_errors, all_errors or dba_errors. That is just the way Oracle works
-- and they are inconsistent because if you attempt to create a view
with compilation errors, the statement fails! :-)

On Wed, 2002-09-04 at 13:59, Bob Gailer wrote:
> Using cx_Oracle:
> 
>  >>> cursor.execute("create or replace procedure pump1(a in number) as 
> begin null; end;")
>  >>> cursor.callproc("pump1(1)")
> 
> Results in:
> 
> DatabaseError: ORA-06550: line 1, column 7:
> PLS-00801: internal error [22503]
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
> 
> What do I need to fix?
> 
> My goal is to have an out parameter (or rmake pump1 a function) with
> data 
> returned to Python. What do I change to do that? I'm assuming the create
> 
> changes to:
> 
> "create or replace procedure pump1(a out number) as begin a :=
> something; end;"
> 
> I also notice that if I make an error in the create statement, execute 
> returns no error to Python!
> 
> Bob Gailer
> mailto:ramrom@earthling.net
> 303 442 2625