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

Harris, Gregory S gsharris at ku.edu
Wed Oct 7 17:36:15 BST 2009


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.

 

My /etc/odbcinst.conf file is as follows:

 

[FreeTDS]

Description     = ODBC Connection via FreeTDS

Driver          = /usr/lib/libtdsodbc.so.0

FileUsage       = 1

 

My /etc/odbc.conf file is as follows:

[coitestdsn]

Driver          = FreeTDS

Description     = ODBC Connection via FreeTDS

Trace           = No

Server          = test3.research.ku.edu

Port            = 1433

TDS Version     = 8.0

Database        = coitest

 

Thanks for any help you can provide.

Greg

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20091007/e8d779fc/attachment.html>


More information about the unixODBC-support mailing list