Compare LEN vs DATALENGTH for trailing spaces, Unicode, UTF-8, NULL, and MAX values before safely resizing SQL Server string columns.
Storing Emoji and Short Messages: nvarchar, UTF-8 and Length
Store emoji safely with nvarchar or UTF-8 varchar, compare LEN and DATALENGTH, and choose message limits that fit full Unicode.
Parameter Types From .NET: Stopping Implicit Conversions at the Source
Match parameter types from .NET to SQL Server columns, avoid implicit conversions, and inspect cached plans for mismatched strings.
Rows That Look Identical but Are Not: Finding Hidden Characters
Expose hidden characters with DATALENGTH and UNICODE, clean known whitespace safely, and add a constraint to prevent recurrence.




