title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | helpviewer_keywords | |||
---|---|---|---|---|---|---|---|---|---|---|---|
SQL Server message results (OLE DB driver) |
Learn about Transact-SQL statements that don't generate OLE DB Driver for SQL Server rowsets or a count, and their expected return values. |
David-Engel |
v-davidengel |
06/14/2018 |
sql |
connectivity |
reference |
|
[!INCLUDE SQL Server]
[!INCLUDEDriver_OLEDB_Download]
The following [!INCLUDEtsql] statements don't generate OLE DB Driver for SQL Server rowsets or a count of affected rows when executed:
-
PRINT
-
RAISERROR with a severity of 10 or lower
-
DBCC
-
SET SHOWPLAN
-
SET STATISTICS
These statements either return one or more informational messages or cause [!INCLUDEssNoVersion] to return informational messages in place of rowset or count results. On successful execution, the OLE DB Driver for SQL Server returns S_OK, and the messages are available to the OLE DB Driver for SQL Server consumer.
The OLE DB Driver for SQL Server returns S_OK and has one or more informational messages available following the execution of many [!INCLUDEtsql] statements or the consumer execution of an OLE DB Driver for SQL Server member function.
The OLE DB Driver for SQL Server consumer is allowed dynamic specification of query text. The consumer should check error interfaces after every member function execution. It should always perform these checks; whatever the value of the return code; whether or not an interface reference to an IRowset
or IMultipleResults
is returned; whatever the count of affected rows.