Closed GoogleCodeExporter closed 8 years ago
I got the same problem on sqlserver 2005.
Original comment by yi.codep...@gmail.com
on 21 Feb 2011 at 3:09
On SQL Server 2005? Are you using a 64-bit version of Python?
For both, what data type are you using for your column? Is it possible the
data type is an unsigned type?
Original comment by mkleehammer
on 28 Feb 2011 at 12:13
The data type I am using is INT(11) in MySQL. It is not an unsigned type as I
was able to retrieve the values correctly in MySQL Workbench, and as I said, it
worked with pyodbc 2.1.7.
Original comment by kaifan0...@hotmail.com
on 28 Feb 2011 at 12:42
I'm observing this bug with MS SQL Server 2008 as well. I have to access some
tables in which the maintainer has rows with id=-1. They show up in Python as
4,294,967,295. The column is defined as [id] [int] NOT NULL, and it is a PK:
>>> cursor.execute("SELECT [id] FROM [journal_categories] ORDER BY
[id]").fetchall()
[(4294967295, ), (0, ), (2, ), (3, ), (4, )]
When I connect to the database with Microsoft's management GUI to run the same
query, I see the expected result: -1,0,2,3,4
I'm using a 64-bit build of Python 2.6.4 on Fedora Core 13, and I'm using
PyODBC 2.1.8.
Original comment by ch...@fastmail.fm
on 4 Apr 2011 at 8:42
Here is a patch that seems to fix this. I've only tested it on 64bit Linux and
32bit Linux.
Hope this helps
Original comment by vikram.b...@gmail.com
on 20 May 2011 at 12:59
Attachments:
definitely helps, but is there a reason this hasn't been merged with the
releases?
Original comment by Raf...@gmail.com
on 21 Sep 2011 at 2:41
Fixing in the py3 branch, which is just about to be promoted to the master
branch as pyodbc 3.0.1
Original comment by mkleehammer
on 2 Nov 2011 at 10:52
Original issue reported on code.google.com by
kaifan0...@hotmail.com
on 18 Feb 2011 at 1:14