We're updating the issue view to help you get more done. 

ODBC nvarchar parameter corruption


When nvarchar parameter length exceeds or equals 2000, ODBC transmit the parameter as ntext, which causes SQL comparisons to fail with message:

1 ERROR [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]The data types nvarchar and ntext are incompatible in the equal to operator.

The ODBC driver set the length of parameter when its mapped type provide it. It is ignored in 4.1.1 because it later recreates parameters by losing some of their settings. But this may be fixed. It should cease specifying Size on parameters as it may cause bugs if this setting in no more lost on subsequent operations as it is currently.





Frédéric Delaporte


Frédéric Delaporte