问题
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