From: Sam Nilsson <lists@se...>  20050822 02:48:05

Oleg Broytmann wrote: > On Sat, Aug 20, 2005 at 02:03:51PM 0700, Sam Nilsson wrote: > >>ValueError: Unknown SQL builtin type: <class 'decimal.Decimal'> for >>Decimal("25.00") > > > Seems like you are using Python 2.4, and SQLObject does not know how to > convert Decimal objects to SQL format. Thanks for your reply Oleg. Your hypothesis sounds good. > Any idea what is a syntax for decimal/currency in different DBMS? Is it > float? INSERT ... VALUES (..., 28.1...). or what? > > Oleg. This from the postgresql manual: Numeric constants are accepted in these general forms: """ digits digits.[digits][e[+]digits] [digits].digits[e[+]digits] digitse[+]digits where digits is one or more decimal digits (0 through 9). At least one digit must be before or after the decimal point, if one is used. At least one digit must follow the exponent marker (e), if one is present. There may not be any spaces or other characters embedded in the constant. Note that any leading plus or minus sign is not actually considered part of the constant; it is an operator applied to the constant. """ I'm not sure about mysql except that it seems that quoting the decimal as a string should work like this: '+5.407' No clue about SQLite. I don't know if SQLObject supports any other DBs. It would be nice to at least get this updated for mysql, but I don't really know where to look (in the SO source code) and I don't fully understand the problem.  Sam 