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

Nick Gorham nick.gorham at easysoft.com
Wed Oct 7 18:16:25 BST 2009


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 edit.

-- 
Nick Gorham
Easysoft Limited


More information about the unixODBC-support mailing list