using pyodbc on linux to insert unicode or utf-8 chars in a nvarchar mssql field

前端 未结 4 1181
抹茶落季
抹茶落季 2020-12-05 04:47

I am using Ubuntu 9.04

I have installed the following package versions:

unixodbc and unixodbc-dev: 2.2.11-16build3
tdsodbc: 0.82-4
l         


        
4条回答
  •  臣服心动
    2020-12-05 05:46

    I had the same problem when trying to bind unicode parameter: '[HY004] [FreeTDS][SQL Server]Invalid data type (0) (SQLBindParameter)'

    I solved it by upgrading freetds to version 0.91.

    I use pyodbc 2.1.11. I had to apply this patch to make it work with unicode, otherwise I was getting memory corruption errors occasionally.

提交回复
热议问题