schotime / NPoco

Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco
Apache License 2.0
848 stars 302 forks source link

Insert with column defined as nvarchar(max) is truncating data #641

Open sarchibald-mdsol opened 3 years ago

sarchibald-mdsol commented 3 years ago

We have an application that is inserting character data into a column defined as nvarchar(max) (SQL Server).

It seems that our data is getting truncated when very long strings are being used for the value. The data is being truncated at about 8000 characters.

Is there a column attribute that needs to be added to the class definition to allow the data to be inserted without truncation?

tbasallo commented 3 years ago

Have you looked at the executed T-SQL to see what parameter is getting passed in? I have never had an issue with this setting.

You can use SQL Profiler to see the final/actual SQL executed.