Hello,
I have the following SQL:
insert into Test(Nr, Description, DT) values(1, 'test 1', null)
DT is of type (binary(4), null).
I check the parameters for SQLCommandMBS by VarType which gives Nil for DT and set parameter with setAsNull().
Executing the Cmd I get the following error:
42000 [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Commands could not be prepared.
42000 [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The implicit conversion from varchar data type into binary is not allowed. Use the CONVERT function to execute this query.
How can I insert null into a column of type (binary(4), null)
?
I can not see where the type varchar comes from.
To reproduce the error a simple insert null into a (binary(4), null)
column should work.