I've tried r3561 and r3577, the reflection is done with no errors.
That's fine!

But another error is occured on querying. Below is the traceback.

----------------------------------------------------------------------
Traceback (most recent call last):
  File "model.py", line 24, in <module>
    smith = Emp.query.filter_by(ename='SMITH').first()
  File "c:\python25\lib\site-packages\sqlalchemy-0.4.0beta7dev_r3577-
py2.5.egg\sqlalchemy\orm\query.py", line 590, in first
    ret = list(self[0:1])
  File "c:\python25\lib\site-packages\sqlalchemy-0.4.0beta7dev_r3577-
py2.5.egg\sqlalchemy\orm\query.py", line 619, in __iter__
    return self._execute_and_instances(context)
  File "c:\python25\lib\site-packages\sqlalchemy-0.4.0beta7dev_r3577-
py2.5.egg\sqlalchemy\orm\query.py", line 622, in
_execute_and_instances
    result = self.session.execute(querycontext.statement,
params=self._params, mapper=self.mapper)
  File "c:\python25\lib\site-packages\sqlalchemy-0.4.0beta7dev_r3577-
py2.5.egg\sqlalchemy\orm\session.py", line 527, in execute
    return self.__connection(engine,
close_with_result=True).execute(clause, params or {}, **kwargs)
  File "c:\python25\lib\site-packages\sqlalchemy-0.4.0beta7dev_r3577-
py2.5.egg\sqlalchemy\engine\base.py", line 779, in execute
    return Connection.executors[c](self, object, multiparams, params)
  File "c:\python25\lib\site-packages\sqlalchemy-0.4.0beta7dev_r3577-
py2.5.egg\sqlalchemy\engine\base.py", line 829, in
_execute_clauseelement
    return self._execute_compiled(elem.compile(dialect=self.dialect,
column_keys=keys, inline=len(params) > 1), distilled_params=params)
  File "c:\python25\lib\site-packages\sqlalchemy-0.4.0beta7dev_r3577-
py2.5.egg\sqlalchemy\engine\base.py", line 841, in _execute_compiled
    self.__execute_raw(context)
  File "c:\python25\lib\site-packages\sqlalchemy-0.4.0beta7dev_r3577-
py2.5.egg\sqlalchemy\engine\base.py", line 852, in __execute_raw
    self._cursor_execute(context.cursor, context.statement,
context.parameters[0], context=context)
  File "c:\python25\lib\site-packages\sqlalchemy-0.4.0beta7dev_r3577-
py2.5.egg\sqlalchemy\engine\base.py", line 869, in _cursor_execute
    raise exceptions.DBAPIError.instance(statement, parameters, e)
sqlalchemy.exceptions.DatabaseError: (DatabaseError) ORA-01036: 変数の名前/数
が無効です。
 'SELECT emp_empno, emp_ename, emp_job, emp_mgr, emp_hiredate,
emp_sal, emp_comm, emp_deptno \nFROM (SELECT emp.empno AS emp_empno,
emp.ename AS emp_ename, emp.job AS emp_job, emp.mgr AS emp_mgr,
emp.hiredate AS emp_hiredate, emp.sal AS emp_sal, emp.comm AS
emp_comm, emp.deptno AS emp_deptno, ROW_NUMBER() OVER (ORDER BY
emp.rowid) AS ora_rn \nFROM emp \nWHERE emp.ename = :emp_ename ORDER
BY emp.rowid) \nWHERE ora_rn>0 AND ora_rn<=1' {'emp_ename': 'SMITH'}
----------------------------------------------------------------------

'ORA-01036' means 'illegal variable name/number'. I think this SELECT
statement is correct... that's strange.

By the way, I'm using Oracle Instant Client 10g(10.2.0.3.0) and Oracle
Database 9i(9.2.0.6.0). I set 'NLS_LANG=JAPANESE_JAPAN.JA16SJIS'
(Japanese Shift-JIS) on client before running the code. Of course,
table/column names are straight ASCII.

On 10月7日, 午前1:17, Michael Bayer <[EMAIL PROTECTED]> wrote:
> rev 3561 should fix the issues here for oracle, let me know if that
> rev works out for you.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to