473,507 Members | 2,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

nocount on problem

GM
i use
set nocount on inside the stored procedure at the beginning however the
Number of Rows Counted/Affected shows up when I execute the stored
procedure in query analyzer using execute sprocName. I also tried to
add the

SET NOCOUNT ON at the beginning of the procedure and it still shows the
number of rows affected.
if i set

set nocount on
exec sprocName then the result set does not show the number of rows
affected.

Any idea why this happens? I know that NOCOUNT is set on runtime not
parse time.

Thanks!

Jul 23 '05 #1
3 3235

"GM" <ge***********@trustasc.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
i use
set nocount on inside the stored procedure at the beginning however the
Number of Rows Counted/Affected shows up when I execute the stored
procedure in query analyzer using execute sprocName. I also tried to
add the

SET NOCOUNT ON at the beginning of the procedure and it still shows the
number of rows affected.
if i set

set nocount on
exec sprocName then the result set does not show the number of rows
affected.

Any idea why this happens? I know that NOCOUNT is set on runtime not
parse time.

Thanks!


I have no idea - the following trivial example works for me, ie. it does not
display the rows affected (in Query Analyzer), using MSSQL 2000 build
8.00.760:

create proc foo
as
begin
set nocount on
select * from master.dbo.sysdatabases
end
go

exec foo
go

If this doesn't help, you might want to post a minimal code example for
Query Analyzer which shows the problem you have, along with details of your
MSSQL version.

Simon
Jul 23 '05 #2
GM
Thanks Simon. NoCount seems to work OK. The issue was that i was using
IMCEDA SpeedSQL and i'm assuming somehow they do something weird
(Probably get @@rowCount or something) but when i ran it on regular QA
it seemed to work. Apparently Imceda SpeedSQL (Formerly known and
SQLExpress) must put some extra code under their interface.

While i was reading Books online it says "The setting of SET NOCOUNT is
set at execute or run time and not at parse time." What are the
implications of that statement?

Thanks

Gent

Jul 23 '05 #3

"GM" <ge***********@trustasc.com> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
Thanks Simon. NoCount seems to work OK. The issue was that i was using
IMCEDA SpeedSQL and i'm assuming somehow they do something weird
(Probably get @@rowCount or something) but when i ran it on regular QA
it seemed to work. Apparently Imceda SpeedSQL (Formerly known and
SQLExpress) must put some extra code under their interface.

While i was reading Books online it says "The setting of SET NOCOUNT is
set at execute or run time and not at parse time." What are the
implications of that statement?

Thanks

Gent


As I understand it, a parse-time option is set when the code is parsed, so
it will be set even if the branch of code it's in is never executed (because
of branching logic or error handling). A run-time option is set only when
that part of code really does execute. See "SET Options" in Books Online for
more details.

By the way, if you want to check up on exactly what SpeedSQL is doing, you
can use Profiler to trace all TSQL sent from it to the server.

Simon
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

117
7102
by: Peter Olcott | last post by:
www.halting-problem.com
28
5170
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
7
2526
by: Leon | last post by:
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...
6
3785
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
16
4870
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
1
11825
by: Lyle Fairfield | last post by:
MS-SQL 2000, Access 2003, ADO 2.8 Please, consider the SQL string in the following code: Dim r As ADODB.Recordset Dim r2 As ADODB.Recordset Set r = CurrentProject.Connection.Execute( _ "SET...
3
4941
by: Rob Meade | last post by:
Hi all, I'm trying to insert a record into a database via ASP, and then extract the id of the current row using @@IDENTITY... I've read the articles on ASPAQ and somewhere else regarding the...
0
820
by: praveen1983 | last post by:
How to find set nocount is on or off in the stored procedures?
3
16890
by: anuragshrivastava64 | last post by:
Can anyone plz tell Set NoCount on equivalent in Oracle. I have used it only in SQL
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1544
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.