I looked through all the answers here and elsewhere on the web, but nothing seems to work. I have a table (sql server 2014) with a varbinary(max) datatype, named "Image" I'm using NHibernate version 3.3.1.4000, which has some fixes regarding varbinary issues.
this is my current hibernate mapping:
<property name="Image" type="BinaryBlob">
<column name="Image" sql-type="varbinary(2147483647)" length="2147483647"/>
</property>
I also tried following variations:
<property name="Image" type="BinaryBlob"/>
<property name="Image" length="2147483647"/>
this is my (c# class) property:
public virtual byte[] Image { get; set; }
I'm getting the familiar error:
---> System.Data.SqlClient.SqlException: String or binary data would be truncated.
I have a feeling the answer is staring me right in the face, but I just can't see it. Any help will be greatly appreciated.