calling Oracle functions

Дамјан Г. пенгуиниста at маил?=.=?iso-8859-5?Q?нет?=.=?iso-8859-5?Q?мк
Fri Sep 13 10:37:14 EDT 2002


Does anyone know, how can I call Oracle stored functions from Python.
I'm using cx_Oracle.

The function takes three parameters and returns one result.

I tried:

	params = ['param1', 'param2', 'param3']
	v_Cursor.callproc("SCH.PKG.MyFunction", params)

and I got the error:

	cx_Oracle.DatabaseError: ORA-06550: line 1, column 8:
	PLS-00221: 'MyFunction' is not a procedure or is undefined

But I can execute the function from sqlplus

	declare result number;
    
	BEGIN
	result := SCH.PKG.MyFunction('param1', 'param2', 'param3');
	END;
		  
Any hints?


-- 
Дамјан

            Yes, I've heard of "decaf." What's your point?




More information about the Python-list mailing list