Subject Re: [IBO] Problem with TIB_LOOKUPCOMBO
Author slsolutions2002
--- In IBObjects@y..., Geoff Worboys (TeamIBO) <geoff@t...> wrote:
> > I discovered what was causing the problem, I just can't understand
> > why it would happen. Problem was that somehow (through poor error
> > checking on my part I suspect) I allowed a blank city name to be
> > stored in the file. For whatever reason, this caused the lookup to
> > function incorrectly. As soon as I deleted the blank city, all
> > worked fine.
> By "blank" you mean NULL ?
> Nulls in a lookup list cause all sorts of problems. IB sorts NULL
> the end of a list (whether you sort ASC or DESC). The client sees
> nulls as blank strings which short sort to the top.
> The reason why the behaviour of lookupcombo appears strange is the
> algorithm attempts to optimise the search by jumping forward through
> the list and then scrolling forward or backward according to the new
> position. So the search jumps forwards - hits the null at the end
> tries to scroll forward (because everyone except SQL knows that
> sort to the top ;-) Since it does not find a matching result the
> search fails.
> And now that you mention it, I do remember hearing this problem
> reported before and should have thought to mention it as a
> possibility. Cant remember everything :-)
> --
> Geoff Worboys - TeamIBO
> Telesis Computing

Thanks much!