Subject RE: [IBO] Where Clause in LookupCombo causes Multiple rows in singleton select error
Author IBO Support List
Have you figured things out here yet?
Sorry I didn't get a response out sooner.
Have you put a SQL trace monitor in your app and gotten the exact SQL sent to the server?
This would likely give you more clues to get to the bottom of things.
Are you relying upon IBO to auto-define your KeyLinks?
If you can send me a little sample app perhaps I can figure things out better.

From: []
Sent: Sunday, April 12, 2015 12:12 PM
Subject: [IBO] Where Clause in LookupCombo causes Multiple rows in singleton select error

I have a query with a few "normal" fields plus two IDs which are populated using TIB_LookupCombos.
At first, both LookupCombos simply selected all data from the underlying table and everything worked fine.
Then I had to limit the data in the second LookupCombo based on the selection of the first LookupCombo.
I did so by using the AfterScroll event of the first LookupCombo and adding a where clause to the query of the second LookupCombo.

The actual queries are difficult to read, so here in pseudocode what the two queries look like:

Select ID, Supplier from TableSupplier

Select B.ID, B.Branch, B2S.SupplierID
from TableBranches B
join Branches_X_Supplier B2S on B.ID=B2S.BranchID
where B2S.SupplierID=:Supplier_ID

Now, as soon as the the where condition is set, I get a Multiple rows on singleton select error.

What I don't understand, with the where condition in place, I get much less data than w/o it and still get the error.

Any hint on how to find the culprit would by very welcome.