[unixODBC-dev] Patch to retrieve error on SQL_NO_DATA

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Wed Nov 30 15:52:15 GMT 2005


As specifications diagnostic data can be returned even on SQL_NO_DATA
(for example if SQLExecDirect do not get any row). This fix the problem.
Currently is the only way to make DBD::ODBC and FreeTDS happy :)

diff -r -u unixODBC-2.2.11.orig/DriverManager/__info.c
unixODBC-2.2.11/DriverManager/__info.c
--- unixODBC-2.2.11.orig/DriverManager/__info.c 2005-11-29
12:08:54.000000000 +0100
+++ unixODBC-2.2.11/DriverManager/__info.c      2005-11-29
12:10:44.000000000 +0100
@@ -4874,8 +4874,7 @@
     DMHSTMT hstmt;
     DMHDESC hdesc;

-    if ( ret_code == SQL_ERROR ||
-            ret_code == SQL_SUCCESS_WITH_INFO )
+    if ( ret_code != SQL_SUCCESS )
     {
         /*
          * find what type of handle it is

freddy77




More information about the unixODBC-dev mailing list