Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Subscription Emailing report when it shouldnt....or when its not desired Expand / Collapse
Author
Message
Posted Tuesday, May 21, 2013 10:24 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, July 18, 2014 1:57 PM
Points: 313, Visits: 715
I have a datadriven subscription that uses a stored procedure.
The code is below:



declare @ReturnValue int

exec @ReturnValue = s003pSRC.sp_Par_Rate_Compare_Report_Subscription_Condition
select @ReturnValue ReturnValue


I have run the sp in ssms and I know its returning a 0 int value, why is the report still being sent out?
Post #1455119
Posted Tuesday, May 21, 2013 11:21 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 7:35 AM
Points: 12,880, Visits: 31,807
dndaughtery (5/21/2013)
I have a datadriven subscription that uses a stored procedure.
The code is below:



declare @ReturnValue int

exec @ReturnValue = s003pSRC.sp_Par_Rate_Compare_Report_Subscription_Condition
select @ReturnValue ReturnValue


I have run the sp in ssms and I know its returning a 0 int value, why is the report still being sent out?

what do you think the return value represents?

by default, unless you modified the procedure to return a an integer determined within the stored procedure(ie return @@rowcount), a procedure returns zero when there are no errors.

Where in your code are you validating whether a subscription should be sent or not?


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1455139
Posted Tuesday, May 21, 2013 11:39 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, July 18, 2014 1:57 PM
Points: 313, Visits: 715
It returns an int value 1 or 0
Post #1455142
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse