Skip to Content.
Sympa Menu

freetds - [freetds] SQLExec succeeds too much

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Peter Deacon <peterd AT iea-software.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] SQLExec succeeds too much
  • Date: Sun, 30 Mar 2003 22:06:25 -0800 (Pacific Standard Time)

/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;

Have Fun!
Peter




Archive powered by MHonArc 2.6.24.

Top of Page