I am attempting to execute a stored procedure via a pyodbc cursor.
cursor.execute('EXEC MyProc ?', (None))
Where MyProc
takes a VARBINARY
parameter.
However, I get this error from FreeTDS:
pyodbc.DataError: ('22018', '[22018] [FreeTDS][SQL Server]Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query. (257) (SQLExecDirectW)')
Only other discussion of this issue I found on this very old thread.
Any ideas how to implement this?
My environment notes:
- Python code running on a Linux server
- Python 3.5
- pyodbc 3.0.10
- MS SQL Server 2014