"SET NOCOUNT ON" is a T-SQL statement provided for MS SQL Server.
It is part of SQL Server's programming language, Transact-SQL.
This language is an extension by Microsoft of the original SQL developed by
IBM.
There are sites where they use T-SQL for all development (I managed one in
the Midlands of England) and it is a fully fledged programming language that
is complete in itself just like COBOL or VB.
There are some very powerful commands available.
Check "Transaction SQL" on Google.
When I first took over the site I mentioned, I was a bit shocked to find
that the "programmers" were SQL guys. But I soon found out that they were
very competent and had some amazing tools. I became persuaded when I saw how
quickly they produced stuff. They could do in 10 minutes, using graphic drag
and drop style tools, what would take three days to do in COBOL...
Although most ODBC drivers will not accept direct T-SQL commands it is
pretty easy to execute them as dynamic SQL, as I showed elsewhere in this
thread. (Always provided you are connected to MSSQL, of course... )
Probably worth mentioning that many systems connect directly to various
databases without using ODBC, by means of ADO, OLEDB, or named pipe
connections, so the limitations of ODBC do not apply to them. Nevertheless,
ODBC is definitely the most flexible approach, even if not the most
efficient. It is hard enough supporting Access, SQL Server, SQLite, MySQL,
PostgreSQL, Oracle and DB2 with the different syntax and idiosynchronisms
of each of these platforms, without having to build a separate product for
each of them. ODBC means you don't have to, but it is still non-trivial to
get absolutely equivalent functionality across all platforms.
Fujitsu COBOL requires ODBC for embedded SQL (ESQL) and you cannot use
resultsets from OLEDB or similar. (A SQL cursor is the way to do it in COBOL
but it is the least favoured way outside COBOL; resultsets are many times
more efficient.) Fujitsu PowerCOBOL offers an ADO control object or you can
instantiate ADO as an Automation server and use it via COM. It is better
than ESQL but not as good as LINQ. I've never tried experimenting with OLEDB
from COBOL but in theory it should be possible to use it just like ADO if
you instantiate an instance of it and manipulate its methods with OO COBOL.
The embedded procedural SQL which a large percentage of the world's COBOL
programs implement is, frankly, obsolete.
C# can use LINQ and Lambda expressions which are just a quantum leap above
ESQL. (I understand this will be made available to VB.Net in the near
future.)
The SQL which runs on modern platforms is a very long way away from the 8
basic commands which ran in the early 1980s...
(SELECT, INSERT, UPDATE, DELETE, DECLARE, OPEN, FETCH, CLOSE)
However, there are many COBOL programmers who believe that 8 commands are
all there is and definitely all you need... :-)