Corrupted Resultsets on RHEL 5.3 64 bit

12 views
Skip to first unread message

Yannick Gingras

unread,
May 12, 2009, 4:02:36 PM5/12/09
to pyo...@googlegroups.com

Hi,
I'm trying to use pyodbc on RHEL 5.3 64 bit but all my strings are
filled with garbage after position 1024. Here is an example:

import pyodbc
conn = pyodbc.connect('DRIVER={SQL
Server};UID=foo;PWD=bar;DATABASE=qux;SERVER=quux;TDS_Version=8.0')
conn.execute("select %r" % ("=" * 1030))

This is what I get back:

[('===============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================\x00\x01\x00i;S+',
)]

This is the content of my /etc/odbcinst.ini:
------------------------------
[SQL Server]
Description = FreeTDS Driver
Driver = /usr/lib64/libtdsodbc.so.0
UsageCount = 1
------------------------------

When I try to do the same on Ubuntu 8.10, both 32 bit and 64 bit, I
get expected result, that is, a string of "=" 1030 character long.

On RHEL 5.3, unixodbc is 2.2.11-7.1, on Ubuntu it's 2.2.11-16build2,
what ever that means. I'm running Pyodbc 2.1.5 on Python 2.5.

Anyone has an idea on what can cause this and how it can be solved?


--
Yannick Gingras
http://ygingras.net/

Ray Van Dolson

unread,
May 12, 2009, 4:13:16 PM5/12/09
to pyo...@googlegroups.com
On Tue, May 12, 2009 at 04:02:36PM -0400, Yannick Gingras wrote:
>
>
> Hi,
> I'm trying to use pyodbc on RHEL 5.3 64 bit but all my strings are
> filled with garbage after position 1024. Here is an example:
>
> import pyodbc
> conn = pyodbc.connect('DRIVER={SQL
> Server};UID=foo;PWD=bar;DATABASE=qux;SERVER=quux;TDS_Version=8.0')
> conn.execute("select %r" % ("=" * 1030))
>
> This is what I get back:

Are you using a hand built pyodbc or the one from EPEL?

Ray

Yannick Gingras

unread,
May 13, 2009, 9:42:02 AM5/13/09
to pyo...@googlegroups.com, Ray Van Dolson
On Tuesday 12 May 2009 16:13:16 Ray Van Dolson wrote:
> Are you using a hand built pyodbc or the one from EPEL?

I easy_installed pyodbc; RHEL does not ship with Python 2.5 so we need
to install all our Python packages by hand.

Reply all
Reply to author
Forward
0 new messages