xp_Sendmail in DTS

  • Why the following command not working in DTS. Can we pass the global variable in xp_Sendmail

     

    EXEC master..xp_sendmail @recipients  = ?, 

                             @message = 'Global Variable is working',

                             @subject = 'Testing global varibale', 

                             @attach_results = 'TRUE', 

                             @Query = 'SELECT 1', 

                             @width=1024


    Kindest Regards,

    Amit Lohia

  • You can't use extended stored procedures in an ExecuteSQL task like normal stored procedures. This is because the meta-data about the parameters is not available at design time.

    You can work around it by using disconnected edit to assign the parameters. Or for a better solution, instead of calling xp_sendmail directly, create a wrapper stored procedure that you call in DTS.

    Anyway, if you're intent on using xp_sendmail, why don't you use the SendMail task?

     

    --------------------
    Colt 45 - the original point and click interface

  • I did the wrapper sp but wanted to know the reason. Thanks for the explanation of why xp_sendmail was not working

     


    Kindest Regards,

    Amit Lohia

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply