[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread Rick Morrison
I don't see how that code would produce those strings. At any rate, we'll need to see the SA schema definition, Jaimy. A small reproducing test case would be ideal, if you can. - Rick --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread Jaimy Azle
On Monday, January 14, 2008, 8:36:14 AM, Rick Morrison wrote: Thanks for very fast response, I don't see how that code would produce those strings. At any rate, we'll need to see the SA schema definition, Jaimy. me neither, the decimal computation looks has nothing to do with sqlalchemy, but

[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread jason kirtland
Jaimy Azle wrote: Hi, I have a problem on using Decimal type along with SQLAlchemy, the decimal value could not be used for any computation after querying something with SQLAlchemy object. This is reproducable in my machine: import decimal from tbl import SBCITM pval =

[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread Rick Morrison
Thanks. It's not clear from your first post exactly which column is in play, but all the numeric ones look large enough to not be distorting a value during a round trip. Let's try Jason's idea -- which db-api module are you using? --~--~-~--~~~---~--~~ You

[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread Jaimy Azle
On Monday, January 14, 2008, 8:46:15 AM, Jaimy Azle wrote: I will try to write some similar test case soon as this is really reproducable in my machine. Sadly, ...and strange. I can reproduce it on every part of my project source, but not on a simple test-case. Yet the problem is still there

[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread Jaimy Azle
On Monday, January 14, 2008, 8:51:44 AM, jason kirtland wrote: Could be something in the MSSQL db-api driver changing the decimal context- replacing the query code with the following gives me the same result: decimal.getcontext().prec = 1 Thanks, I will try with it. -- Salam,