Skip to content
Official FreeTDS repository
Branch: master
Clone or download
r313pp and freddy77 Fix bulk insert multibyte string support in names
When column name (or table name in blob type case) has non ASCII characters length of such string was calculated incorrectly.
In such cases bulk insert has failed with:
Msg 4804, Level 17, State 1
        While reading current row from host, a premature end-of-message was encountered--an incoming data stream was interrupted when the server expected to see more data. The host program may have terminated. Ensure that you are using a supported client application programming interface (API).
Latest commit c02625e Mar 4, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Convert DocBook to XML format Mar 15, 2019
phptests remove .cvsignore files Mar 14, 2012
src Fix bulk insert multibyte string support in names Mar 21, 2019
vms ctlib: Add a test for cs_will_convert Mar 17, 2019
win32 Add a "windows.h" helper include file Oct 29, 2018
.editorconfig Add .editorconfig ( Mar 1, 2014
.travis.yml Do not ask for password from Travis CI if error reading password May 18, 2015
AUTHORS update some documentation file Apr 20, 2016
CMakeLists.txt cmake: Use UNICODE build for tests like for autoconf Mar 18, 2019
COPYING.LIB Use licenses with up to date FSF address Apr 19, 2016
INSTALL Write a note about INSTALL.GIT in INSTALL document Aug 25, 2016
INSTALL.GIT Convert DocBook to XML format Mar 15, 2019 Remove CVS $Id on most files updated after the date specified Aug 19, 2017
TODO.freddy Remove a TODO from my list Oct 28, 2012
Thanks-0.95 Adding Thanks-0.95 file Jun 8, 2015
Thanks-1.0 neater output Mar 22, 2011
config.rpath start development release Mar 13, 2019
interfaces Add sample pool configuration. Oct 9, 2002
tds.dox Remove CVS $Id on most files updated after the date specified Aug 19, 2017


README for FreeTDS 1.1

Release date 13 March 2019

* to build FreeTDS read the file INSTALL or
  the FreeTDS Users Guide (doc/userguide/index.html) and

FreeTDS is a free implementation of Sybase's DB-Library, CT-Library,
and ODBC libraries. FreeTDS builds and runs on every flavor of
unix-like systems we've heard of (and some we haven't) as well as
Win32 (with or without Cygwin), VMS, and Mac OS X.  Failure to build
on your system is probably considered a bug.  It has C language
bindings, and works also with Perl and PHP, among others.

FreeTDS is licensed under the GNU LGPL license. See COPYING.LIB for

Other files you might want to peruse:

AUTHORS		Who's involved
BUGS		Some things we fixed, or think we did
NEWS		Summary of feature changes and fixes
README		This file
TODO		The roadmap, such as it is

Also, doc/api_status.txt shows which functions are implemented.

For details on what's new in this version, see NEWS.  For unbearable
detail, see git log.


A User Guide, in xml and html form, is included in this distribution.
Also included is a reference manual, generated in HTML with Doxygen.
"make install" installs the HTML documentation, by default to

Note to Users

Submissions of test programs (self-contained programs that demonstrate
functionality or problems) are greatly appreciated.  They should
create any tables needed (since we obviously don't have access to your
database) and populate them.  Unit tests for any of the libraries
is appreciated

Notes to Developers

The code is split into several pieces.

1) tds directory is the wire level stuff, it should be independent of
   the library using it, this will allow db-lib, ct-lib, and ODBC to
   sit on top.

2) db-lib directory. This is the actual db-lib code which runs on top of

3) ct-lib directory. This is the ct-lib code which runs on top of tds.

4) server directory. This will be a set of server routines basically
   to impersonate a dataserver, functions like send_login_ack() etc...

5) odbc directory. ODBC implementation over tds.  Uses iODBC or
   unixODBC as a driver manager.  You need to have one of those if you
   are using the ODBC CLI.

6) unittests directories. Test harness code for ct-lib, db-lib, ODBC and

6) samples directories. Sample code for getting started with Perl,
   PHP, etc...

7) pool directory. A connection pooling server for TDS.  Useful if you
   have a connection limited license.  Needs some hacking to get
   configured but is quite stable once configured correctly. Contact
   the list if interested in how to use it.

Please look at doc/getting_started.txt for a description of what is
going on in the code.

Side note: Brian, as many free software authors, appreciates postcards
from all over. So if you live someplace neat (read: not Michigan) and
want to send one, email him ( for his current snail mail


You can’t perform that action at this time.