Skip to Content.
Sympa Menu

freetds - Re: [freetds] Problems with UnixODBC and FreeTDS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Problems with UnixODBC and FreeTDS
  • Date: Fri, 6 Jul 2007 20:57:27 -0400

Frediano Ziglio wrote:
> > These are the last 2 lines of the freeTDS log when there is an error:
> >
> > odbc.c:4396:SQLGetData(0x844d548, 12, 1, 0xb6df3608, 2048, 0xb6df3600)
> > odbc.c:4396:SQLGetData(0x844d548, 12, 1, 0xb76728ab, -2046,
> > 0xb6df3600)
>
>
> in src/odbc/odbc.c (SQLGetData):
>
> #ifdef TDS_NO_DM if (cbValueMax < 0) {
> #odbc_errs_add(&stmt->errs,
> "HY090", NULL); ODBC_RETURN(stmt, SQL_ERROR); }#endif
>
> remove #if/#endif if row and should not core... but caller should
> still not call us in such way...

Freddy, why wrap error checking in #ifdef TDS_NO_DM? Seems to me it's
*always* better to check inputs for validity.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page