Skip to Content.
Sympa Menu

freetds - RE: [freetds] SQLExec succeeds too much

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] SQLExec succeeds too much
  • Date: Mon, 31 Mar 2003 11:03:25 +0200

>
> /w sybase (TDS 6.0) created an error that should fail but
> doesen't, not
> even SQL_SUCCESS_WITH_INFO.
>
> For example: SELECT DATEADD(dd,-100000,getdate())
>
> It's level is 16 and when I run it from isqlw it aborts the query.
>
> The message appears in the message chain but looking around
> it's sent to
> the odbc message callback sometime after SQLExecDirect gets called...
> This fixed it for me.
>
> In odbc.c::_SQLExecute
>
> Changed..
>
> case TDS_COMPUTEFMT_RESULT:
> case TDS_ROWFMT_RESULT:
> done = 1;
> break;
>
> to:
>
> case TDS_COMPUTEFMT_RESULT:
> case TDS_ROWFMT_RESULT:
> if (tds->state == TDS_COMPLETED)
> done = 1;
> break;
>

Perhaps is better

case TDS_COMPUTEFMT_RESULT:
case TDS_ROWFMT_RESULT:
break;

Does this solution work for you ?

> Have Fun!
> Peter

freddy77

=================================
"STRICTLY PERSONAL AND CONFIDENTIAL

This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."

=================================




Archive powered by MHonArc 2.6.24.

Top of Page