Unexpected floating point results using mxODBC modules

David Bolen db3l at fitlinxx.com
Thu Jun 14 18:56:35 EDT 2001


victor at prodigy.net (Victor Muslin) writes:

> On Windows 2000, using Oracle and Active State's Python 2.1, and
> mxODBC module, the result returned by the cursor object's fetchall
> function contains floating point numbers for columns defined as
> "NUMBER" datatype. This column containing integers only.

Well, although the database column may only have integer values, the
NUMBER datatype can be defined to hold just about anything from
integer to double precision floating point.  So one question would be
how is the actual column defined, and not just what does it contain.

Perhaps mxODBC is interrogating the server more completely and
discovering that the column is actually defined to support floating
point precision, and is setting the returned data type appropriately.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list