Burhan wrote: > Platform: Windows XP > Oracle : 10.2.0.4.0 > SQLAlchemy: 0.7 > Python: 2.7
> Driver: cx_Oracle (compiled with unicode support as per the Windows > binary) What version is in use here? Is the "unicode support as per the Windows binary" you refer to cx_oracle's "UNICODE" mode (im guessing so since that version seems to include builds with the mode turned on)? this setting has been discontinued with cx_oracle and is removed in version 5.1, and is never required for Python 2.xx. SQLAlchemy supports this mode marginally but the error you are getting would appear that this mode is in use (and an edge that SQLA has missed). You should upgrade to cx_oracle 5.1, or use the 5.0 build without the needless/extremely inconvenient UNICODE flag, ensuring the special UNICODE mode is not in use - so that cursor.execute() accepts strings as well as Python unicode objects equally. > Next problem is a simple case doesn't work, the exact line is: > > foo = > Table('MERCHANT',oracle_meta,autoload=True,autoload_with=oracle_engine) > > Error is: > > NoSuchTableError: MERCHANT SQLAlchemy will interpret 'MERCHANT' as: '"MERCHANT"' i.e., with quotes, case sensitive. Case insensitive names with SQLAlchemy are indicated using all lowercase names, i.e. 'merchant' - else quoting is used. The Oracle SQL statement you illustrate is using case insensitive names. Still, its not clear how it wouldn't locate the table at all as 'MERCHANT' should equate to '"MERCHANT"' (haven't tried lately though), turn on SQL echoing with echo='debug' (after changing 'MERCHANT' to 'merchant' in code) to ensure it's talking to the right database and such. > > However, the exact same connect string with raw cx_Oracle works great: > >>> cur.execute(u"SELECT MERCHANT_NUMBER FROM MERCHANT") >>> r = cur.fetchall() >>> len(r) >>> 2922 > > Please point me in the right direction. > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalchemy@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.