Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Removing the Echoing of Sql Server

Author  Topic 

rd_innovatives
Starting Member

18 Posts

Posted - 2006-09-20 : 03:14:39
Hi All,

Hope all is going well ...... I have a question for you ...

Whenever we execute any command in sql query analyzer ... suppose to retrieve a table ... the sql server echoes a line .... 'X rows selected ' or like that ....
Is there any command by which I can supress the echoing of SQL Server in the GRID box ....
Like that @echo off in DOS

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-09-20 : 03:17:35
why you want to supress that message? and i guess its '(x row(s) affected) '

Chirag
Go to Top of Page

rd_innovatives
Starting Member

18 Posts

Posted - 2006-09-20 : 03:29:08
yes Chirag .... I want to supress that Line in the grid window .... you know the command ...i think it would be like
SET <SOMETHING....> OFF ...
please let me know the command
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-09-20 : 03:36:16
You mean you want to suppress the count of rows message? The rowcount number?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

pootle_flump

1064 Posts

Posted - 2006-09-20 : 04:06:40
SET NOCOUNT ON
Go to Top of Page

rd_innovatives
Starting Member

18 Posts

Posted - 2006-09-20 : 04:15:33
Thanks Pootle .... its the right answer .....
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-09-20 : 04:18:15
quote:
Originally posted by rd_innovatives

Thanks Pootle .... its the right answer .....

Is this homework?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

LazyDragon
Starting Member

30 Posts

Posted - 2006-09-20 : 06:31:51
quote:
Originally posted by chiragkhabaria

why you want to supress that message? and i guess its '(x row(s) affected) '


Because it is a good practice for many reasons.

1. Performance. You are not sending irrelevant information back to the client.

2. ADO doesnt always like this messages. See
http://tutorials.aspfaq.com/8000xxxxx-errors/why-do-i-get-800a0cc1-errors.html


LazyDragon
Go to Top of Page
   

- Advertisement -