I’m writing code, which can execute SQL queries via ODBC.
For it I’m running SQLExecDirect(), then SQLExtendedFetch() to get result columns.
However statements like INSERT, UPDATE etc. don’t have return columns and SQLExtendedFetch finishes with an error code.
The question is: how to determine from query if that kind of query has return columns or not?
Edit: Forget to mention, that for querys, that should not have return columns SQLGetDiagRec() returns empty error message (I’v tested it on MS SQL driver) .
Call SQLNumResultCols and if it says 0 you’ve got no result-set.