methew / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

Pyodbc is corrupting fetched fields #315

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Connect to database
2. Select * from a table containing varchars
3. print contents

What is the expected output? What do you see instead?
Expected outout should be :
[(1,'Display')]
Instead I see:
[(1,'\x00\x00\x00\x00lay')]

What version of the product are you using? On what operating system?
Linux <name> 2.6.18-348.3.1.el5 #1 SMP Tue Mar 5 13:19:32 EST 2013 x86_64 
x86_64 x86_64 GNU/Linux

pyodbc-2.1.5-2.el5

Please provide any additional information below.

Original issue reported on code.google.com by archank2...@gmail.com on 29 Mar 2013 at 4:26

GoogleCodeExporter commented 9 years ago
Same problem here.  Product version/OS:

Linux <name> 3.0.58-0.6.6-default #1 SMP Tue Feb 19 11:07:00 UTC 2013 (1576ecd) 
x86_64 x86_64 x86_64 GNU/Linux

>>> pyodbc.version
'3.0.6'

Original comment by pahughe...@gmail.com on 23 Apr 2013 at 3:20

GoogleCodeExporter commented 9 years ago
Has anyone found the reason why this is happening ?

RHEL 5
MSSQL 2008
pyodbc 3.0.7
sqlalchemy
freetds 0.91
unixodbc 2.3.0

had to use pypyodbc 

Original comment by a.p.chat...@gmail.com on 21 Oct 2013 at 7:16

GoogleCodeExporter commented 9 years ago
In my case, the driver was 32 bit and pyodbc was 64 bit 

Original comment by archank2...@gmail.com on 22 Oct 2013 at 7:15

GoogleCodeExporter commented 9 years ago
This may be related to this issue: 
https://code.google.com/p/pyodbc/issues/detail?id=78&can=1 due to a patch being 
reverted at some point

Original comment by RyanCaco...@gmail.com on 14 Oct 2014 at 10:14