Message from discussion
DECIMAL columns: Cursor.description is <type 'float'>?
MIME-Version: 1.0
Received: by 10.150.139.15 with SMTP id m15mr1019977ybd.16.1238513539554; Tue,
31 Mar 2009 08:32:19 -0700 (PDT)
Date: Tue, 31 Mar 2009 08:32:19 -0700 (PDT)
In-Reply-To: <a38282d2-4000-4a0e-b26d-df12a6e1ea4a@k2g2000yql.googlegroups.com>
X-IP: 71.164.183.147
References: <a38282d2-4000-4a0e-b26d-df12a6e1ea4a@k2g2000yql.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1b3)
Gecko/20090305 Firefox/3.1b3,gzip(gfe),gzip(gfe)
Message-ID: <d8f13251-f8c0-48f8-82ee-ad8afb168860@j8g2000yql.googlegroups.com>
Subject: Re: DECIMAL columns: Cursor.description is <type 'float'>?
From: mkleehammer <mkleeham...@gmail.com>
To: pyodbc <pyodbc@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
In general, no. If you run this test on other databases/drivers
you'll find they are often decimal.Decimal objects.
The data types in the cursor come from the driver, so apparently your
driver is telling us it is a float/real. We can verify this by
turning on ODBC tracing and running your program.
Also, a faster way to see the data types is simply:
cursor.execute(..)
print cursor.description