[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    Re: [freetds] SQL_SUCCEEDED macro / SQL_NO_DATA for CREATE TABLE
From:       Sebastien FLAESCH <sf () 4js ! com>
Date:       2018-10-19 14:35:17
Message-ID: be5c752b-6e9f-9fe8-18d4-c410526c9463 () 4js ! com
[Download RAW message or body]

Hi Frediano,

Good point, I saw now in the doc that there is a different expectation with ODBC 2.x \
and ODBC 3.x!

So that means that we should prepare the code to check for SQL_SUCCEEDED() or \
SQL_NO_DATA after SQLExec*()

I guess you mean this macro:

#define SQL_SUCCEEDED_EX(R) (((R) & 2) == 0)

ODBC standard headers should then provide such macro to cover all valid return \
values.

Seb

On 10/19/18 1:08 PM, Frediano Ziglio wrote:
> I think mostly historic reasons.
> I remember I wrote a macro that considered SQL_NO_DATA as success too
> to use in these cases.
> Is not clear the distinction between SQL_NO_DATA and SQL_SUCCESS in
> these cases, seems that for instance updates/inserts should return
> SQL_NO_DATA and not SQL_SUCCESS according to the documentation.
> Maybe would be good to check and change for version 1.1.
> 
> Frediano
> 
> Il giorno mer 10 ott 2018 alle ore 15:43 Sebastien FLAESCH
> <sf@4js.com> ha scritto:
> > 
> > Hi all,
> > 
> > Must have been discussed several times:
> > 
> > Why does FreeTDS APIs return SQL_NO_DATA for an DDL SQL such as
> > CREATE TABLE, when other ODBC drivers just return 0/SQL_SUCCESS
> > (or 1/SQL_SUCCESS_WITH_INFO)?
> > 
> > This prevents us to use the standard SQL_SUCCEEDED() macro.
> > 
> > Seb
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS@lists.ibiblio.org
> > https://lists.ibiblio.org/mailman/listinfo/freetds
> _______________________________________________
> FreeTDS mailing list
> FreeTDS@lists.ibiblio.org
> https://lists.ibiblio.org/mailman/listinfo/freetds
> 

_______________________________________________
FreeTDS mailing list
FreeTDS@lists.ibiblio.org
https://lists.ibiblio.org/mailman/listinfo/freetds


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic