Fabian wrote:
Sjoerd Mullender wrote:
In ODBC functions can generally return SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, or SQL_ERROR. In the latter two cases one or more messages can be retrieved with SQLGetDiagRec. I don't know off-hand what *should* happen in the case you describe, but what certainly *could* happen (but this is not based on intimate knowledge of the description of SQLExecute) is that the SQLExecute call returns SQL_SUCCESS_WITH_INFO.
Hmm, PostgreSQL does like I suggested, the update is not committed, because the select throws an exception.
My guess is that SQL_SUCCESS_WITH_INFO is the equivalent of warnings produced during the setup/execution (like changed cursors, etc). Does ODBC know about warnings for Statements, ResultSets and Connections?
I don't have the spec available at the moment, so I can't tell you what it says. I know with every function there is a long list of possible error and warning conditions. I don't know whether this particular one is covered.
Need sync with Niels on the standard I think.
As far as Niels is concerned, My guess is he'll view it as two SQL
statements, which is exactly what they are.
--
Sjoerd Mullender