question

sksamguru avatar image
sksamguru asked

how to send email for returnvalue from stored procedured?

Hi AlL, I used execute SQL task and defined parameter as returnvalue(int). And add script task to declare the processed success or failure. Atlast connect with send mail task. But I am getting blank email or if process failed = 0. I have three varaibles - sample, returnvalue, and emailMessage. Any suggestion where I missed to get the returnvalue?????? My script task declarations: Dim intReturnValue As Integer Dim strEmailMessage As String intReturnValue = Dts.Variables("ReturnValue").Value If intReturnValue = 0 Then strEmailMessage = "The Process Failed" Else strEmailMessage = "The process succeded" End If Dts.Variables("Sample").Value = strEmailMessage Dts.TaskResult = ScriptResults.Success End Sub
ssist-sqlstored-procedures
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.