[Sqlrelay-discussion] Error messages are not visible
Brought to you by:
mused
|
From: Maciej W. <mac...@co...> - 2005-09-08 12:06:12
|
Hi!
When I try to execute Oracle function from python with code like this:
#
----------------------------------------------------------------------------------------------
from SQLRelay import PySQLRClient
from SQLRelay import PySQLRDB
con=PySQLRClient.sqlrconnection('localhost',9000,'','test','test',0,1)
cur=PySQLRClient.sqlrcursor(con)
res = cur.prepareQuery('select PCK_TESTY_STEROWNIKA.PROC_3(:in1, :in2)
from dual')
cur.inputBind('in1', 'jkkkak', 10, 0)
cur.inputBind('in2', 1, 10,2)
res = cur.executeQuery()
print 'res:', res, cur.errorMessage()
print 'val:', cur.getField(0,0)
print 'end'
#
----------------------------------------------------------------------------------------------
then if there is a DML operation in my function Oracle returns error like:
Ora 14551 Cannot Perform A Dml Operation Inside A Query
that says it's not possible to use this function with select xxx from
dual clause.
The problem is that SQLRelay doesn't return any errors.
Output is simply:
res: 1 None
val: None
end
I'm not sure whether other errors from functions called in this way are
visible... but it seems to be a bug. We're using SQLRelay 0.36.4
--
Maciej Wisniowski
|