Subject Re: [IBO] Lookup issue
Author Helen Borrie
At 09:41 PM 20/04/2004 +0000, you wrote:
>I have a TIB_LookupCombo whose SQL contains a where clause. Using the
>monitor it showed that whenever I access the combo IBO executes the
>same SQL changing the where clause using the fields in KeyLinks and
>ignoring my where clause. I think that IBO is probably trying to
>obtain the primary keys. But since it ignored my where clause I get a
>message saying that the query is returning multiple records where a
>singleton selecg is expected. That wouldn't happen if my where clause
>weren't ignored. How could I go around it, having IBO maintaining my
>where clause?

A lookup column in the main data set (the user of the lookup) passes its
key value to the lookup dataset. The lookup dataset then uses that key
value to return a unique row. That's how the lookup works. If the lookup
set has more than one row having that key value, then you get a multiple
rows error, because the lookup is not valid.

There should not be a where clause in your lookup dataset's SQL that
involves that key. Use a view if the lookup dataset doesn't supply a
unique single-column key.

There is not enough information here to be of any more help.

Helen