When nvarchar parameter length exceeds or equals 2000, ODBC transmit the parameter as ntext, which causes SQL comparisons to fail with message:
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.
This will just mitigate the trouble for cases where the parameter actual value is shorter than 2000 characters. But if the parameter value is actually reaching the 2000 characters length, the trouble will still be there. This value case cannot be fixed by NHibernate, it should be considered an external trouble. This trouble is also described here.
When
nvarchar
parameter length exceeds or equals2000
, ODBC transmit the parameter asntext
, which causes SQL comparisons to fail with message: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.