[DB-SIG] decimal datatypes

Mike Dewhirst miked at dewhirst.com.au
Sun Apr 2 08:48:42 CEST 2006


Chris

> I hope I have the right list for this question...
> 
> According to the homepage for pyodbc, pyodbc supports decimal data types,
> but when I try to copy a row from one table to another, I'm getting:
> 
> pyodbc.NotSupportedError: ('Python type Decimal not supported.  param=26',
> 'HY097')
> 

try this ...

from decimal import Decimal

or

from decimal import *

I could be way off-beam with your problem but it sounds like the decimal 
module might be what you want. It contains the Decimal class.

OTOH - it is possible or even more likely that you need a bespoke 
mapping from your actual data type to one supported by pyodbc (ie., 
decimal).

OTTH - it is also possible that you spelled decimal incorrectly. It may 
actually start with a lower case d

Good luck

Mike


More information about the DB-SIG mailing list