[cx-oracle-users] Passing None as values of bind variables in cx_Oracle's cursor.execute() command
Brought to you by:
atuining
From: Wong W. Meng-R. <r3...@fr...> - 2011-12-07 10:15:39
|
Hello there, I am converting my application from python 1.5.2 and oracledb to python 2.7.1 and cx_Oracle.. I noticed one issue here whenever the bind variable's value is None, it exhibits some strange behavior. First observation: When it is the first time I pass in a bind variable as None, it gives an EOL file. However, subsequent passing of None value to the same SQL seems to be working fine. Second observation: When there is more than one bind variables contain None value, the value that actually got received at Oracle level seems to be messed up. (We turn on the highest debug level at Oracle level in order to see the bind variable value that are received). Those defined as None are received as some arbitrary value, some are the values from one or a few of the total bind variables. I read something about passing None is not supported in cx_Oracle, is it true and is there a workaround? I think the second observation could be due to the buffer is not flushed from a previous usage and still being used in the subsequent call. Is there anyway we can get rid of both observation? Must we remove any bind variables that we know carrying None as value in the SQL statement? This looks like some extensive change if our application needs to verify the value first before it being used in the SQL. Regards, Wah Meng Goto http://cimhelp.freescale.net to create a Genesis Wafermap Ticket. |