[freetds] Problems with UnixODBC and FreeTDS
James K. Lowden
jklowden at freetds.org
Fri Jul 6 20:57:27 EDT 2007
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
More information about the FreeTDS
mailing list