Re: SET NOCOUNT ON OPTION
From: Leon (vnality_at_msn.com)
Date: 10/20/04
- Next message: Diego: "Datagrid.columns(i).visible=false"
- Previous message: Eliyahu Goldin: "Re: DataGrid boundcolumn problem"
- In reply to: Cirrosi: "Re: SET NOCOUNT ON OPTION"
- Next in thread: Cirrosi: "Re: SET NOCOUNT ON OPTION"
- Reply: Cirrosi: "Re: SET NOCOUNT ON OPTION"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 20 Oct 2004 03:44:02 -0500
So is it good or bad to use SET NOCOUNT ON?
use my example sp for explanation. Thanks!
"Cirrosi" <CirrosiN_O-S_P_A-M@fastwebnet.it> wrote in message
news:66pdd.15666$1q2.1609@tornado.fastwebnet.it...
>A sp is able to return motre than one resultset.
> Even an update or an insert returns resultset, but in many case you don't
> need that.
> With nocount option you obtain only the resultset relative to last query.
>
> "Leon" <vnality@msn.com> ha scritto nel messaggio
> news:OVirIejtEHA.1332@TK2MSFTNGP10.phx.gbl...
>> DOES SETTING NOCOUNT ON option affect my stored procedures and website
>> performance in anyway within my asp.net application?
>>
>> When and when not to set SET NOCOUNT ON?
>>
>> I know what it does but not exactly where and when I want to use it.
>>
>> i.e.
>> CREATE PROCEDURE GetAuthorization 2.0
>> @Username Varchar( 20 ),
>> @Password Varchar( 16 )
>> as
>> SET NOCOUNT ON
>> declare @AccountID int
>>
>> set @AccountID = -1
>> select @AccountID =
>> case
>> when Password = @Password and Active = 1 then AccountID
>> when Password = @Password then -2
>> else -3
>> end
>> from Account
>> where Username = @Username
>>
>> return @AccountID
>> go
>>
>>
>>
>
>
- Next message: Diego: "Datagrid.columns(i).visible=false"
- Previous message: Eliyahu Goldin: "Re: DataGrid boundcolumn problem"
- In reply to: Cirrosi: "Re: SET NOCOUNT ON OPTION"
- Next in thread: Cirrosi: "Re: SET NOCOUNT ON OPTION"
- Reply: Cirrosi: "Re: SET NOCOUNT ON OPTION"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|