locked
4000 nvarchar not working RRS feed

  • Question

  • I have an issue where I have set the max character limit of a textbox to 'blank' which should allow max characters in the field.  However, when I run the app, I get a 4000 char limit validation error when trying to save the record.  SQL Mgmt Studio shows nvarchar(max) in the table (vs. 4000) and yet the application still validates against 4000 char?

    I tried setting the max characters to 4000 (and 2000), republishing, and then back to 'blank' and republishing with no effect.  When I did publish 2000 as a limit, I did get a 2000 char limit validation error, but since I was already getting the 4000 validation error, it is inconclusive as to whether the 4000 setting republish had any effect.

    After the 2000 republish and then 'blank' republish, the 4000 validation error returned (even though SQL shows max).

    Any thoughts?

    Scott

    Wednesday, June 5, 2013 5:28 PM

Answers

  • Found the problem, seems that my audit log had a 4000 char limit on the oldval and newval, so when an audit record was being created, the server validation failed because the char limit was exceeded.  I changed the audit log limits.  it's all good now! :)

    Wednesday, June 5, 2013 9:29 PM