I am trying to insert > 8000 characters (submit from a web page) via ExecuteNonQuery
(and DatabaseFactory.CreateDatabase()
from MS Practices Enterp
The issue may not be the storage of the data, it may be the retrieval.
If you are trying to determine whether or not more than 8000 chars were stored in the DB through enterprise manager, then you are out of luck if you just select the contents of the columns and look at the text length: enterprise manager limits the column output.
To determine how much data is actually stored in the column, execute the following query:
SELECT DATALENGTH(Terms) FROM tblTerms
This will tell you how much text was stored.
EDIT:
Another thought just occurred: the enterprise library caches stored procedure parameters in order to improve performance. If you changed the stored procedure after testing with the parameter set to nvarchar(8000)
, then switch the parameter to nvarchar(max)
without resetting the application (if IIS-hosted, then iisreset
or dirty web.config
), then you will still be using the old stored proc parameter.