Re: [cx-oracle-users] Decimal and european NLS_LANG
Brought to you by:
atuining
From: Amaury F. d'A. <ama...@gm...> - 2010-10-25 18:37:59
|
2010/10/25 Michael Bayer <mi...@zz...>: > I have a user (a user of the database access layer SQLAlchemy) who wants to do this: > > import os > import cx_Oracle > import decimal > > os.environ["NLS_LANG"] = "GERMAN" > > dsn = cx_Oracle.makedsn('localhost', '1521', 'xe') > conn = cx_Oracle.connect('scott', 'tiger', dsn) > cursor = conn.cursor() > cursor.execute("select :foo from dual", foo=decimal.Decimal("56.5")) > print cursor.fetchall() > > The error is: > > cx_Oracle.DatabaseError: OCI-22062: invalid input string [56.5] A similar issue was fixed in cx_Oracle 5.0.3: http://cx-oracle.sourceforge.net/HISTORY.txt see item 14) Are you using an older version? -- Amaury Forgeot d'Arc |