Skip to content

Latest commit

 

History

History
18 lines (17 loc) · 1.13 KB

returning-sql-no-data.md

File metadata and controls

18 lines (17 loc) · 1.13 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Returning SQL_NO_DATA
Returning SQL_NO_DATA
David-Engel
davidengel
01/19/2017
sql
connectivity
reference
SQL_NO_DATA [ODBC]
backward compatibility [ODBC], SQL_NO_DATA
compatibility [ODBC], SQL_NO_DATA

Returning SQL_NO_DATA

When an ODBC 2.x application workingwith an ODBC 3.x driver calls SQLExecDirect, SQLExecute, or SQLParamData, and a searched update or delete statement was executed but did not affect any rows at the data source, the ODBC 3.x driver should return SQL_SUCCESS. When an ODBC 3.x application working with an ODBC 3.x driver calls SQLExecDirect, SQLExecute, or SQLParamData with the same result, the ODBC 3.x driver should return SQL_NO_DATA.

If a searched update or delete statement in a batch of statements does not affect any rows at the data source, SQLMoreResults returns SQL_SUCCESS. It cannot return SQL_NO_DATA, because that would mean that there are no more results, not that there is a result from a searched update/delete that affected no rows.