Could the error be related to the actual statement sp_executesql is executing?
Example:
DECLARE @sql NVARCHAR(MAX)
SET @sql = 'DECLARE @tbl TABLE (Test CHAR(1))'
SET @sql = @sql + 'INSERT INTO @tbl VALUES (''ABCD...'')'
EXEC sp_executesql @sql
Generates:
Msg 8152, Level 16, State 14, Line 1
String or binary data would be truncated.
The statement has been terminated.
_____________________________________________________________________
- Nate
@nate_hughes