[unixODBC-dev] Problem getting error on SQL_NO_DATA

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Fri Apr 8 12:53:56 BST 2005


After some tests if seems that if a function (SQLFetch or
SQLMoreResults) return SQL_NO_DATA it can also return warning/errors
however the way unixODBC work (cache error on
SQL_SUCCESS_WITH_INFO/SQL_ERROR) do not work cause it do not expect
diagnostics on SQL_NO_DATA.

For example using a store procedure with this body on mssql

  SELECT 1
  RAISERROR ('test', 16, 1)

using this sequence

   SQLBindCol
   SQLExecDirect
   SQLFetch (success)
   SQLFetch (no data)
this last fetch return 'test' diagnostic (RAISERROR cause a diagnostic
information to be returned from server)

freddy77




More information about the unixODBC-dev mailing list