I was using NHibernate when mapping some objects from a legacy system to objects in a new system and had an issue with one of the records failing to save.
The error message was “String or binary data would be truncated. The statement has been terminated.” but when I looked at the SQL being executed against the server the parameters were all question marks – VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?).
The error message was exactly right, the problem was caused by the truncation of data. When I was mapping from my source object to my target object I was inserting a text string which was too long for the property and when NHibernate was saving, the data was being truncated. The question marks in the SQL output threw me though.