[unixODBC-dev] Patch to retrieve error on SQL_NO_DATA

Nick Gorham nick at lurcher.org
Wed Nov 30 16:11:39 GMT 2005


ZIGLIO, Frediano, VF-IT wrote:
> 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
> 
Ok,

Just one question, how does the app know its meant to check for any 
diagnostics?

-- 
Nick Gorham
Easysoft Limited



More information about the unixODBC-dev mailing list