Subject Re: [IBO] IB_Query.Lookup BUG with a returning field with NULL value
Author Geoff Worboys
> In fact, the resulting variant is not null, instead is not
> assigned! So I can't distinguish from a not found row and
> a found row but with a null field:

This is an attribute of all IBO columns as variants. The IBO code in
IBA_Column.IMP does...

function TIB_Column.GetAsVariant: Variant;
begin
Result := Unassigned;
if not IsNull then
...

So this happens in all column instances, not just lookup. Actually,
just browsing through the VCL db.pas unit, it seems that TField does
use Null and not Unassigned. Whether Jason had a reason for using
Unassigned I do not know.

Back to your problem.

In actual fact, since the native Lookup function is supposed to be the
same as the TDataset Lookup function (according to the online doco)
then it should reall return a Variant = False (see the VCL TDataset
help). Such a return does not seem all that useful but thats what it
is supposed to do.


Geoff Worboys
Telesis Computing