I tried the same thing, but I obtain an 'ORA-01843: not a valid month'
message from the backend.
This is my model:
class BaseObject(Base, Dictionaryable):
__tablename__ = 'baseobj'
id = Column(Integer, Sequence((__tablename__+'id_seq')[-30:]),
autoincrement=True, primary_key=True)
realtype = Column(Unicode(30), nullable=False, index=True)
codice = Column(Integer, nullable=True)
nome = Column(Unicode(255), nullable=False)
nonattivo = Column(TIMESTAMP , nullable=True)
notanonattivo = Column(Unicode(255), nullable=True)
After a commit I have:
DatabaseError: (DatabaseError) ORA-01843: not a valid month
'UPDATE baseapparati SET nonattivo=:nonattivo,
notanonattivo=:notanonattivo WHERE baseapparati.id
= :baseapparati_id' {'baseapparati_id': 1, 'notanonattivo': '',
'nonattivo': '2009-12-03 11:41:07.457000'}
I assigned to the object of type BaseObject a value
datetime.datetime.now()
Perhaps I can give the connection/session whatever a command like
alter session set nls_date_format='DD/MM/YYYY';
but I think I've done wrong something instead. So two questions:
1) where I was wrong? (better answare)
2) as an alternative, where can I give the alter session... command to
get it activated in all sessions?
thanks for the help!
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
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.