Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Truncateing Warnings in Send Mail Task upon Saving

Author  Topic 

qman
Constraint Violating Yak Guru

442 Posts

Posted - 2011-08-18 : 09:23:00
I am using expressions in a Send Mail Task, to populate an emails body. I get the following warning upon saving the SSIS package:

"... may be truncated if it exceeds the maximum length of 4000 characters."

Can anyone suggest how to disable this warning?

My expressions is something like this:


(@[User::A] == 0 || @[User::B] == 0) ? "Package FAILED to run!" + "\n\n" + "xxxxxxxxxxxxxxxxxx" + "\n\n" + "Time Stamp: " + (DT_WSTR, 4000) GETDATE() + "\n\n" + "xxxxxxxxxxxxxxxxxx" + "Total Records Read" + "\n\n" + "A: " + (DT_WSTR, 4000) @[User::A_count] + "\n\n" + "B: " + (DT_WSTR, 4000) @[User::B_count] + "\n\n" ...............

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-18 : 09:36:17
thats because the concatenated result exceeds the maximum length of message that it can hold. you need to restrict it to 4000 characters

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-18 : 09:37:23
or another way is write the message to a text file and add it as an attachment to mail

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

qman
Constraint Violating Yak Guru

442 Posts

Posted - 2011-08-18 : 10:01:29
Thanks, restricting to < 4000 worked for me.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-18 : 10:59:43
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -