[unixODBC-support] UnixODBC+FreeTDS+MSSQL Server, reading fields truncated to 255 characters

Harris, Gregory S gsharris at ku.edu
Wed Oct 7 18:32:55 BST 2009

Hi Nick,

Thanks for the response.  So there are no limitations on the number of
characters on a field returned by the unixODBC driver itself, there is
just the limit on the isql test program?  Hmm, maybe unixODBC isn't the
problem then.  I will look into the ruby-dbi and ruby-odbc drivers then.
I was just trying to use isql to troubleshoot the source of the problem,
whether it was unixODBC, freeTDS, ruby-odbc or ruby-dbi.


-----Original Message-----
From: unixodbc-support-bounces at mailman.unixodbc.org
[mailto:unixodbc-support-bounces at mailman.unixodbc.org] On Behalf Of Nick
Sent: Wednesday, October 07, 2009 12:16 PM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] UnixODBC+FreeTDS+MSSQL Server, reading
fields truncated to 255 characters

Harris, Gregory S wrote:
> Hello,
> I'm having a problem in which when I attempt to READ from a Microsoft 
> SQL Server 2005 database the maximum amount of text returned from a 
> varchar(4000) field is 255 characters. If I attempt to WRITE more than

> 255 characters, I succeed. I believe the problem is unixODBC related 
> because I inserted 600 characters of text into a field and then 
> attempted to SELECT the data from both the freetds 'tsql' utility, and

> the unixODBC 'isql' utility. The tsql utility will give me back all 
> 600 characters, but the isql utility will only show the first 255 
> characters. Is this a known limitation or bug of unixODBC or is there 
> something I am doing wrong? I am currently using the stock redhat 5 
> unixODBC-2.2.11-7.1 RPM, but I can compile from source if it turns out

> a different release fixes this problem.

isql just shows the first 256 chars, its not meant as anything other 
than a test app. If you need more characters the source is there to

Nick Gorham
Easysoft Limited
unixODBC-support mailing list
unixODBC-support at mailman.unixodbc.org

More information about the unixODBC-support mailing list