Subject | Re: [ib-support] Detecting a Not NULL field in a select |
---|---|
Author | Paul Reeves |
Post date | 2002-11-22T15:21:31Z |
Ignacio J. Ortega wrote:
the api documentation is clear on anything.)
if (sqltype & 1 == 0)
{
//param or select list item that CANNOT contain NULL
}
else
{
//param or select list item CAN contain null.
}
But having said that, it is a long time since I did any direct work with
XSQLVARs and when I did I wasn't interested in whether the field had a
not null constraint. I was more concerned about getting data out, if any
thing was there.
If this doesn't work - let me know. I hate it when documenation is
_really_ wrong.
Paul
--
Paul Reeves
http://www.ibphoenix.com
Supporting users of Firebird and InterBase
>Well, the documentation seems pretty clear on this subject. (Inasmuch as
> Yes, i know that, but to my understanding, sqlind is used when the data
> is effectively NULL, but not when the underliying field has a "Not Null"
> constraint, my question was badly formulated, i know sqlind and the
> sqltype+1 trick..
>
the api documentation is clear on anything.)
if (sqltype & 1 == 0)
{
//param or select list item that CANNOT contain NULL
}
else
{
//param or select list item CAN contain null.
}
But having said that, it is a long time since I did any direct work with
XSQLVARs and when I did I wasn't interested in whether the field had a
not null constraint. I was more concerned about getting data out, if any
thing was there.
If this doesn't work - let me know. I hate it when documenation is
_really_ wrong.
Paul
--
Paul Reeves
http://www.ibphoenix.com
Supporting users of Firebird and InterBase