Re: [cx-oracle-users] cx_Oracle 5.2
Brought to you by:
atuining
From: Doug H. <djn...@gm...> - 2015-07-23 18:04:18
|
Try changing your test case to use a byte string instead of a unicode string. Change cursor = session.execute('SELECT "SCHEMA_lot_lot_key", "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1', {'param_1':1}) to cursor = session.execute(b'SELECT "SCHEMA_lot_lot_key", "SCHEMA_lot_lot_id" \nFROM (SELECT "SCHEMA".lot.lot_key AS "SCHEMA_lot_lot_key", "SCHEMA".lot.lot_id AS "SCHEMA_lot_lot_id" \nFROM "SCHEMA".lot) \nWHERE ROWNUM <= :param_1', {b'param_1':1} I suspect you may have a problem with mixing unicode and byte strings. You don't mention which Python version you use but the string prefix suggests you are using 3.x. Are you using a recent version, e.g. 3.4? Note that the log does not show the results of the SA internal queries that try to find out how strings are returned. You mention trying older versions of SA, but have you tried newer versions? Do you env variable for LANG or LC_*? Also, is the Oracle server version the same as the client version? You might also check the values of the NLS character set parameters. Hope this helps. Doug On 22 July 2015 at 19:13, Mike Bayer <mi...@zz...> wrote: > > > On 6/20/15 11:40 PM, Anthony Tuininga wrote: > > What is cx_Oracle? > > cx_Oracle is a Python extension module that enables access to Oracle for > Python 2.x and 3.x and conforms to the Python database API 2.0 > specifications with a number of enhancements. > > > Where do I get it? > > http://cx-oracle.sourceforge.net > > > > What's new? > > http://cx-oracle.readthedocs.org/en/latest/releasenotes.html > > > One of my users is seeing issues with SQL result sets returning zero rows > when upgrading to cx_Oracle 5.2 from 5.1.3. Unfortunately we don't have a > simple reproduction case, and it also involves SQLAlchemy which I know rules > out it being a simple test case for cx_Oracle developers. However, I'm > hoping that some other cx_Oracle users eventually can confirm some similar > issue to shed some light on it, so consider this post to be at least a flag > that something has changed for at least one user: > > https://bitbucket.org/zzzeek/sqlalchemy/issues/3491/queryfirst-sometimes-returns-none > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- Doug Henderson, Calgary, Alberta, Canada |