The error message in question doesn't come from any code in the tds library. It comes from the Sybase server as part of a server response (04) packet. The "tds" unittests apparently don't stress the library enough to detect this error. All the dblib unittests fail if the library is compiled for AIX with HW_BIG_ENDIAN.