[egenix-users] mxODBC bigint fetched as float

M.-A. Lemburg mal at egenix.com
Wed Feb 16 17:35:56 CET 2005


Tim Morgan wrote:
> I have been using the mxODBC Zope DA for some time now and it's been
> great. Our agency recently upgraded Zope to version 2.7 with Python 2.3,
> and the Database Adapter now returns BIGINTs as FLOATs. This is a bit of
> a problem for all our applications currently in use because we use
> BIGINT in several of our tables and the floats being returned are
> unexpected.

We didn't change anything in this area, so this must be related
to either the ODBC driver or the database.

Note that BIGINTs are returned as Python long objects by mxODBC,
if the database tells mxODBC that the columns are of this type.
Only DECIMAL, FLOAT etc. are returned as floats.

It is possible that Zope 2.7 introduced some change related to
Python longs, but I'm not aware of anything in this area.

> I opened up a command prompt and connected with mxODBC and got the same
> result (so it's not just the DA).
>  
> We use:
> * MS SQL Server 2000
> * Windows 2000 Server
> * Zope 2.7
> * Python 2.3
> 
> I have downloaded the latest version of the Database Adapter and still
> have the same problem.
> 
> Any help would be greatly appreciated. Thanks.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Feb 16 2005)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the egenix-users mailing list