How to migrate firebird DATA blob subtype binary to SQL Server sql_variant using Python?

旧街凉风 提交于 2021-01-29 17:31:28

问题


As part of my records which come back from a Python fdb SQL select query, I get a b"string". I pass it on to SQL Server and execute a call to be stored into a sql_variant column in a SQL Server database.

However I get this error:

pyodbc.Error: ('HYC00', '[HYC00] [Microsoft][ODBC SQL Server Driver]Optional feature not implemented (0) (SQLBindParameter)')

Here is the firebird field spec that the b"string" comes out of using fdb.

DATA BLOB segment 80, subtype BINARY Nullable

I even tried converting the b"string" to a bytearray using:

pyodbc.Binary(b_string)

Still get the same error. :(

Is there anyway I can get more info on the error. Maybe turn on more logging somewhere? I am using SQL Server Express locally on Windows.

By process of elimination I figured out it was the DATA field which was causing this error, since when I pass in NULL instead to the SQL Server execute call the error goes away.

来源:https://stackoverflow.com/questions/63642220/how-to-migrate-firebird-data-blob-subtype-binary-to-sql-server-sql-variant-using

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!