('42000', '[42000] [FreeTDS][SQL Server]Unicode data in a Unicode-only collation or ntext data canno

用pyodbc查询数据,windows执行成功,linux上报错

('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) (SQLExecDirectW)')


发现查询值的类型为 nvarchar(MAX),将其转为nvarchar即可


另一个方法是freeTDS的升级

你可能感兴趣的:(sql)