Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 21st, 2004, 02:30 AM
Registered User
 
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Effect of set nocount on return status

Hi all,

I had a perfectly fine working stored procedure. In order to increase it's performance I put set nocount on in it. After that I started to encounter an error message.

"p_ABC stored procedure attempted to return a status of null, which is not allowed, a status of 0 will be returned instead."

p_ABC stored procedure is being called inside main stored procedure in which I have put set nocount on statement. By the way if I remove
set nocount on, everything starts to work fine again.

My question is "Is this predicatable behaviour of set nocount on statement and is documented already?". Reply to this question would really help me to remove my confusion over the issue.

Thanks in advance,
Puneet Mittal






Puneet
 
Old May 21st, 2004, 11:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Could u send ur SP's Code. Maybe u have changed the code, its strange.

Always:),
Hovik Melkomian.
 
Old May 22nd, 2004, 09:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

I've never had any problems setting set nocount on in my stored procedures. I would have to think it is because you are calling a stored procedure within a stored procedure... I imagine that setting it at the master stored procedure level would give you a performance enhancement and stop the problem associated with this error...

Brian

Brian
 
Old May 24th, 2004, 04:17 AM
Registered User
 
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Bmains,Melvik

I had put the set nocount on statement at master stored procedure level only. My stored procedure text is too long. If you could send me your email addresses I can email them.

Puneet

Puneet
 
Old May 24th, 2004, 04:18 AM
Registered User
 
Join Date: Apr 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

oops my email address is [email protected]

Puneet
 
Old May 24th, 2004, 04:28 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

u can mail me from http://p2p.wrox.com/pop_profile.asp?...isplay&id=1047

Always:),
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
hi xml toggle effect gauravkg XSLT 1 September 8th, 2006 09:04 AM
Effect of changing option value anshul Javascript How-To 4 May 17th, 2005 06:05 AM
Set Nocount On Colonel Angus SQL Server 2000 2 April 21st, 2004 10:21 AM
Return a Record set into a table? morpheus Classic ASP Basics 2 November 18th, 2003 11:38 AM
Set nocount on balakumar1000 SQL Server 2000 1 October 13th, 2003 09:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.