Open GoogleCodeExporter opened 9 years ago
The same problem exists running on RHEL6 against a Sybase IQ database, Sybase
ASE database, and a SQL Server database, using Data Direct 7.1 ODBC drivers.
This problem does not manifest in pyodbc-3.0.3.
conn = pyodbc.connect("DSN=...")
cur = conn.execute("select 1 as num")
print cur.fetchall()
print cur.description
[(206158430209, )]
(('num', <type 'int'>, None, 5, 5, 0, False),)
Same code running on RHEL5:
[(1, )]
(('num', <type 'int'>, None, 5, 5, 0, False),)
The ODBC trace files show that, other than the handles (pointers) used, the
ODBC processing is identical.
Original comment by colorado...@gmail.com
on 7 Aug 2014 at 4:49
I experience the exact same problem as mentioned by @colorado with 3.0.7 when
querying against Sybase.
import pyodbc
dbconn = pyodbc.connect("DSN=....")
c = dbconn.cursor()
c.execute("select 0, 1, 2, 3, 4, 5, 6")
print c.fetchone()
>> (210453397504, 210453397505, 210453397506, 210453397507, 210453397508,
210453397509, 210453397510)
It seems to be adding 2^32 * 7 **2 to the value for every result. This is true
up until 2147483648 is used, at which point values are correct and are returned
as type Long.
The exact same script using 3.0.3 returns the correct values. I am using RHEL6.
Original comment by michaelw...@gmail.com
on 27 Apr 2015 at 10:32
Original issue reported on code.google.com by
lileix...@gmail.com
on 7 Mar 2014 at 2:01