ODBC and NULL values

119 views
Skip to first unread message

Michael I

unread,
May 3, 2010, 5:05:46 PM5/3/10
to JSDB
Hi
Is it possible now in JSDB to identify whether the field value taken
by a odbc is NULL?
I'm using the odbc query(), maybe we should add something like isNull
or some special value __NULL__ ?

Michael

--
You received this message because you are subscribed to the Google Groups "JSDB" group.
To post to this group, send email to js...@googlegroups.com.
To unsubscribe from this group, send email to jsdb+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jsdb?hl=en.

Michael I

unread,
Oct 31, 2012, 1:49:19 PM10/31/12
to js...@googlegroups.com
I have made small change to differentiate null values
in file sql.h
Insted of
 const char * Value(size_t i)
  {return Data.Has(i) ? (char*)Data[i]->sData : (char*)NULL;}

const char * Value(size_t i)
{
    if (Data.Has(i))
        if (Data[i]->DataSize==SQL_NULL_DATA)
            return "[null]";
        else
            return (char*)Data[i]->sData;
    else
        return (char*)NULL;
}

I'm not sure if it's a good solution ?
Michael

Shanti Rao

unread,
Nov 1, 2012, 1:44:51 AM11/1/12
to js...@googlegroups.com
Thanks!

Shanti
> --
> You received this message because you are subscribed to the Google Groups
> "JSDB" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/jsdb/-/W4pQ0wmViCIJ.
Reply all
Reply to author
Forward
0 new messages