I am writing code that can execute SQL queries through ODBC.
To do this, I run SQLExecDirect() , then SQLExtendedFetch() to get the result columns.
However, expressions such as INSERT , UPDATE , etc., do not have return columns, and SQLExtendedFetch ends with an error code.
The question arises: how to determine from a query if this type of query has return columns or not?
Edit : Forget that for queries that should not have return columns, SQLGetDiagRec () returns an empty error message (I'v checked it for MS SQL driver).
source share