mtadayon / pypyodbc

Automatically exported from code.google.com/p/pypyodbc
0 stars 0 forks source link

Mapping bigint in sqlserver 2008 into float, instead of int in python3 #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.A row with a column with type bigint on MS Sqlserver 2008 R2, for example the 
value is 5132
2.cur.execute(query)
3.for row in cur.fetchall():
    for field in row:
        print (field, end=" ")
        print(type(field))

What is the expected output? What do you see instead?
The expected output is:
5235 <class 'int'>

but what I saw is:
5235.0 <class 'float'>

What version of the product are you using? On what operating system?
unixODBC.i686                     2.2.14-12.el6_3                  @ol6_latest
unixODBC-devel.i686               2.2.14-12.el6_3                  @ol6_latest
freetds.i686                      0.91-2.el6                       @epel
on RHEL6

Python 3.3.1 
pypyodbc (1.3.3)

Please provide any additional information below.
MS sqlserver 2008R2 64 bit.

Original issue reported on code.google.com by hellowor...@gmail.com on 2 Sep 2014 at 3:55