Skip to Content.
Sympa Menu

freetds - Re: [freetds] SQL_NO_DATA or SQL_SUCCESS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SQL_NO_DATA or SQL_SUCCESS
  • Date: Wed, 27 Feb 2008 12:11:15 +0100

>
> On Sun, 24 Feb 2008, Frediano Ziglio wrote:
>
> > Hi,
> > often many people let me note that our ODBC driver returns
> SQL_NO_DATA
> > from SQLExecDirect/SQLExecute instead of SQL_SUCCESS. I
> always replied
> > that SQL_NO_DATA it's documented and normal. Some days ago
> however I ask
> > me what the behavior of MS ODBC SQL Server driver... I
> changed a bit our
> > tests (just in my working directory) in order to print any
> > SQLExecDirect/SQLExecute results and I noted that MS driver NEVER
> > returns SQL_NO_DATA !!! And I have to say that our tests
> works changing
> > our driver returning SQL_SUCCESS instead of SQL_NO_DATA. So
> actually I'm
> > thinking about merging this patch.
>
> Imitation always trumps the spec?! From the MS generic ODBC
> doc it was
> only supposed to apply to UPDATE/DELETE that change no rows anyway.
> (rowcount == 0)
>
> On another note tried the latest .82 from cvs and it looks good :)
>
> Have Fun!
> Peter

Mmmm... as said if nobody complains I would commit... so I complain :)

Yes, it seems that DELETE/UPDATE with no rows produce SQL_NO_DATA!!
However I must say that as documented only DELETE/UPDATE with no rows
should return SQL_NO_DATA. The situaction is complicated by the fact
that only mssql (no Sybase) return proper informations to detect
UPDATE/DELETE execution!
So perhaps the patch should be applied but in the future should be
enhanced to handle DELETE/UPDATE with no rows...
Yes, at the end I think that this patch should be merged.

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page