('42000', '[42000] [FreeTDS][SQL Server]Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. (4004) (SQLFetch)')
The default TDS or ODBC version in the base image python:3.11-slim-buster(Debian 10) may be too low.
The default TDS version is 4.2. Update the version, and it will be fine.
You can execute tsql -C in the container will get this.
# tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v1.00.104
freetds.conf directory: /etc/freetds
MS db-lib source compatibility: no
Sybase binary compatibility: yes
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: yes
OpenSSL: no
GnuTLS: yes
MARS: no
We found an error.
The default TDS or ODBC version in the base image
python:3.11-slim-buster
(Debian 10) may be too low. The default TDS version is4.2
. Update the version, and it will be fine. You can executetsql -C
in the container will get this.Reference: https://www.freetds.org/userguide/choosingtdsprotocol.htm https://learn.microsoft.com/en-us/sql/relational-databases/security/networking/tds-8