Displaying Number Of Rows Affected

In SSMS, when you execute an UPDATE, DELETE or INSERT you get a message indicating the number of row affected, e.g. (10 row(s) affected). Is there a way to capture that message in the Results area of the Editor?

It’s one o those things…at work, the number of rows was not being displayed. I thought I found the answer by setting Tools->Option->Editor| Tools “Return Statement” because right afterward, the number of rows affected was being displayed. On my home PC, the number of rows affected is displayed without setting Tools->Option->Editor| Tools “Return Statement”. Idk.

Statement:03.05.2011 20:11:52 0:00:00.031: Executed Successfully

1: set nocount ON

INSERT INTO AlexDB.dbo.number1 (Column_2, Column_3) VALUES (1, 1)

INSERT INTO AlexDB.dbo.number1 (Column_2, Column_3) VALUES (1, 1)

Statement:03.05.2011 20:11:59 0:00:00.031: 2 rows affected

1: set nocount OFF

INSERT INTO AlexDB.dbo.number1 (Column_2, Column_3) VALUES (1, 1)

INSERT INTO AlexDB.dbo.number1 (Column_2, Column_3) VALUES (1, 1)

Karl,
actually the option you mentioned is not related to this. It is related to Navigator pane only.

Regarding your question - it seems to me that you connect to another server from the home and you have different settings on your servers.
You can manage it from Editor with SET NOCOUNT OFF statement, see my output below.

Alexander.

Also, if it’s another server, you might want to set this option as a
default one. Go to the Server Properties (connect to this server and go to the
Tool > Administer > Server Properties) and go to the Connections tab.
There, under Default User Options you’ll find “Display how many rows
were affected” option. Set it to true.

If it’s not the 5.5 beta you are working with, go to the active connection
in Connection Manager, right click it and select Server Properties from there.

Igor.

I know this is a very old thread, but is this possible in the current Toad for SQL Server? I’ve checked the option under Connections and it’s marked as true, but I still don’t get the results message displayed.

Thanks