Foloowing code works perfectrly in VB.NET. However, when I tried to use it as VBScript with Integration Services, I got Error message
'String or binary data would be truncated. The statement has been terminated'. It is about NVarChar data type (see blue line of code).
SQL Server 2008 Parameter
@Body NVARCHAR(MAX)
Dim cmdInsert = New SqlClient.SqlCommand("usp_INSERT_UPDATE_ARTICLE_DATA_MIGRATION", insertConn)
cmdInsert.CommandType = CommandType.StoredProcedure
cmdInsert.Parameters.Add("@Title", SqlDbType.VarChar, 4000).Value = "testing"
cmdInsert.Parameters.Add("@Body", SqlDbType.NVarChar).Value = stringAdd
cmdInsert.Parameters.Add("@ArticleDate", SqlDbType.DateTime).Value = Now()
cmdInsert.ExecuteNonQuery()
cmdInsert.Dispose()
Any idea how to fix this problem? Again it is about Integration Services VBScript task