Export to GitHub

pyodbc - issue #315

Pyodbc is corrupting fetched fields


Posted on Mar 29, 2013 by Happy Elephant

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.

Comment #1

Posted on Apr 23, 2013 by Swift Kangaroo

Same problem here. Product version/OS:

Linux 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'

Comment #2

Posted on Oct 21, 2013 by Swift Lion

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

Comment #3

Posted on Oct 22, 2013 by Happy Elephant

In my case, the driver was 32 bit and pyodbc was 64 bit

Comment #4

Posted on Oct 14, 2014 by Massive Bird

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

Status: New

Labels:
Type-Defect Priority-Medium