[python-sybase] varchar(350) data getting truncated to 255 characters

Harri Pasanen harri.pasanen at trema.com
Mon Sep 25 22:36:24 EST 2006


Which TDS version are you using?
If you put 
        tds version = 7.0

in to your .freetds.conf for the db in question, does it still fail?

-Harri


On Saturday 23 September 2006 15:50, Python wrote:
> On Fri, 2006-09-22 at 16:02 -0400, Python wrote:
> > I am running Linux (Fedora 3) with
> > 	sybase 0.37
> > 	freetds 0.63
> > to collect data from a remote Microsoft SQL server.  There is at
> > least one field that is truncated to 255 characters as I read it:
> > (curs.fetchone())
> >
> > The curs.description shows:
> > 	('Features', 1, 0, 255, 0, 0, 1)
> > 	('Remarks', 1, 0, 255, 0, 0, 1)
> >
> > However, those fields are actually defined as varchar(350).
> >
> > Is this a limitation in the modules?  Am I doing something wrong?
>
> I tracked down the issue to freetds.  It limits varchar fields to
> 255 chars.  The freetds site recommends converting or casting the
> fields to text.
>
> http://www.freetds.org/userguide/troubleshooting.htm#KNOWNISSUES
> has the details.
>
> > Should I be using a different set of modules to connect a Python
> > program to a remote Microsoft SQL server?


Privileged or confidential information may be contained in this message.  If you are not the addressee of this message please notify the sender by return and thereafter delete the message, and you may not use, copy, disclose or rely on the information contained in it. Internet e-mail may be susceptible to data corruption, interception and unauthorised amendment for which Wall Street Systems does not accept liability. Whilst we have taken reasonable precautions to ensure that this e-mail and any attachments have been swept for viruses, Wall Street Systems does not accept liability for any damage sustained as a result of viruses.  Statements in this message or attachments that do not relate to the business of  Wall Street Systems are neither given nor endorsed by the company or its Directors.



More information about the Python-sybase mailing list