Re: Stop DTS execution

From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 10/12/04


Date: Mon, 11 Oct 2004 19:14:40 -0500

Include SET NOCOUNT ON as the first statement in your proc: This will
suppress DONE_IN_PROC messages that can interfere with resultsets, messages
and output parameters. For example:

CREATE PROC StorProc
@SomeParameter int
AS
SET NOCOINT ON
...
GO

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
<anonymous@discussions.microsoft.com> wrote in message 
news:1e0e01c4af9f$8b1952d0$a501280a@phx.gbl...
> What do I need to set it to?
>
>>-----Original Message-----
>>Do you have SET NOCOUNT ON in your proc?
>>
>>-- 
>>Hope this helps.
>>
>>Dan Guzman
>>SQL Server MVP
>>
>><anonymous@discussions.microsoft.com> wrote in message
>>news:2a1301c4af96$af3f1a40$a301280a@phx.gbl...
>>> Here is my code:
>>> EXEC StorProc ?
>>> DECLARE @RecCount INT
>>> SET @RecCount = @@ROWCOUNT
>>> IF @RecCount <> 0
>>> BEGIN
>>> RAISERROR ('', 16, 1)
>>> END
>>>
>>> that code raises an error in QA.
>>> But next step in DTS (Dynamic Propertines task) still
>>> executes while workflow is based on success.
>>>
>>>
>>>>-----Original Message-----
>>>>Hi
>>>>
>>>>This sounds like you need to write a stored procedure to
>>> control the logic.
>>>>Alternatively
>>>>checking @@rowcount and using raiserror may be a
>>> solution.#
>>>>
>>>>John
>>>>
>>>>"Mark Goldin" <markgoldin@comcast.net> wrote in message
>>>>news:%232bsvbsrEHA.896@TK2MSFTNGP12.phx.gbl...
>>>>> But I am not running ActiveX script to make a decision
>>> I am running SQL
>>>>> statement and if it returns no data then I need to
> stop
>>> execution.
>>>>>
>>>>> "John Bell" <jbellnewsposts@hotmail.com> wrote in
>>> message
>>>>> news:#bAfxmerEHA.2636@TK2MSFTNGP09.phx.gbl...
>>>>> > Hi
>>>>> >
>>>>> > In the example http://www.sqldts.com/default.aspx?
>>> 214,1 instead of
>>>>setting
>>>>> > the global variable set the result.
>>>>> >
>>>>> > John
>>>>> >
>>>>> > "Mark" <anonymous@discussions.microsoft.com> wrote
> in
>>> message
>>>>> > news:2f3a01c4ad80$c56f95a0$a601280a@phx.gbl...
>>>>> > > How can I stop DTS execution conditionally?
>>>>> >
>>>>> >
>>>>>
>>>>>
>>>>
>>>>
>>>>.
>>>>
>>
>>
>>.
>> 


Relevant Pages