Forum Replies Created

Viewing 4 posts - 1 through 5 (of 5 total)

  • RE: Help EXEC inside SP not working

    It is the cause of the synatx error but email is still not being sent, in fact something as simple as this does not print anything:

    ALTER PROCEDURE [dbo].[P_SENDEMAILNOTIFICATION]

    @Days INT...

  • RE: Help EXEC inside SP not working

    Welsh Corgi (5/12/2011)


    Where exactly are you putting it? What line?

    You Can't get the value of @@Error?

    Regards,

    Welsh

    like so:

    ALTER PROCEDURE [dbo].[P_SENDEMAILNOTIFICATION]

    @Days INT = 0

    AS

    BEGIN

    DECLARE @EmailId NVARCHAR(1000)

    SELECT

    EXEC msdb.dbo.sp_send_dbmail

    @profile_name = 'Profile_Admin' ,...

  • RE: Help EXEC inside SP not working

    Lowell (5/12/2011)


    does this return results/an explanation for unsent mail/failed mail?

    SELECT

    err.[description],

    fail.*

    FROM [msdb].[dbo].[sysmail_event_log] err

    inner join [msdb].[dbo].[sysmail_faileditems] fail

    ON err.mailitem_id = fail.mailitem_id

    This returns...

  • RE: Help EXEC inside SP not working

    Yes I checked it's not in queue

Viewing 4 posts - 1 through 5 (of 5 total)