[Python-talk] accessing remote Microsoft SQL database from Linux using Python

Lloyd Kvam lkvam at venix.com
Sat Sep 23 16:06:12 EDT 2006

On Fri, 2006-09-22 at 18:02 -0400, Python wrote:
> I've been using the freetds library and Sybase python module to access a
> remote Microsoft SQL server.  This appeared to work OK.
> In actuality, the charvar fields that were more than 255 characters were
> getting truncated.  I believe the problem is in freetds.  The
> description of the cursor shows field lengths of 255 and I did not have
> any cross check against the remote database.
> It's a commercial application, so I can't just grab mxODBC.  I also
> don't know if it would work anyway.
> I would appreciate a kick in the right direction.

Not sure anyone cares, but the solution turned out to be in the
file.  I created a server entry that specified the protocol version to
use (version 8).  Apparently the protocol version does not get
negotiated automatically.  Now the correct field sizes are getting

Lloyd Kvam
Venix Corp.
1 Court Street, Suite 378
Lebanon, NH 03766-1358

voice:  603-653-8139
fax:    320-210-3409

More information about the Python-talk mailing list