Catch a Null value

Kevin Lyons kevin at
Tue Sep 26 11:29:58 EDT 2000

"Ruslan R. Laishev" wrote:
> Hi All!
>         Still have a question:"how to catch null values" ?
>         Is there someone from developers at all ?
> Ruslan R. Laishev wrote:
> >
> > Hi All!
> >         Is there any flag in the TDSCOLINFO which shows the Null value ?

There is, in the tds layer, a function called tds_get_null that returns
1 if the column is NULL, 0 if otherwise. 

 if (tds_get_null(tds->res_info->current_row, col) == 1)  {
    /* we've got a null value so handle accordingly */

Give a man a fire and he's warm for one night, but set a man on fire and
warm for the rest of his life." - Terry Pratchett "Jingo"

More information about the FreeTDS mailing list