On Saturday, January 3, 2009, 7:07:00 AM, Michael Trier wrote: > Would it be possible for you to do up a test case demonstrating the > problem? If so, we could get to it very quickly.
sure, here it is: from elixir import * import sqlalchemy as sa import unittest db_opts = {} db_eng = None class MSTSTA(Entity): CMSTIDCD = Field(String(3), primary_key=True) CMSTIDNM = Field(String(16)) CMSTIDDS = Field(String(32)) CMSTAUDT = Field(Numeric(8,0)) CMSTAUTM = Field(Numeric(6,0)) CMSTAUUS = Field(String(24)) def setUp_dbconn(): global db_opts, db_eng url = 'mssql://sa:mas...@127.0.0.1/TESTDB' db_opts['strategy'] = 'threadlocal' db_opts['pool_size'] = 16 db_opts['pool_recycle'] = 900 db_opts['max_overflow'] = 32 db_opts['echo'] = False db_opts['echo_pool'] = False db_eng = sa.create_engine(url, **db_opts) metadata.bind = db_eng setup_all(True, checkfirst=True) class TestMSSQLNumeric(unittest.TestCase): def test_1(self): obj = MSTSTA( CMSTIDCD = 'UNG', CMSTIDNM = 'Ungaran', CMSTIDDS = 'Ungaran', CMSTAUDT = 20090102, CMSTAUTM = 93000, CMSTAUUS = 'ADMIN' ) try: session.save(obj) session.commit() session.close() except: session.rollback() raise def test_2(self): obj = MSTSTA.get('UNG') self.assert_(obj is not None) try: obj.CMSTAUDT = 20090103 session.update(obj) session.commit() session.close() except: session.rollback() raise if __name__ == '__main__': setUp_dbconn() unittest.main() the exception raised: File "c:\python25\lib\site-packages\sqlalchemy-0.5.0rc4-py2.5.egg\sqlalchemy\databases\mssql.py", line 72, in process if not isinstance(value, float) and value._exp < -6: AttributeError: 'int' object has no attribute '_exp' -- Salam, -Jaimy Azle "Great new ideas usually come from very small teams... don't give up so easily." -- John Kaster --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---