Thursday, May 21, 2009

Classic ASP, Stored Procedures and NText

This note is about the problem I had trying to display the NText variable from executing a stored procedure. Atlast, I figured out that we need to have the NText variable as the the last variable in the query in order for the data to get displayed in classic ASP pages.


NText, NVarchar in SQL Server - Support for Unicode Content

NText used for characters in excess of 8000 bytes (=~4000 characters) of unicode content
NText stores upto 1 GB of data (Text stores upto 2 GB of data)
NText cannot be indexed
NText will not employ string functions like Len, Replace
When substr function is used on NText, there is conversion to nvarchar


NVarchar stores upto 4000 characters with unicode support for characters. This is an extra overhead and use this only if it is really needed.