Subject IBO Doesn't like this query
Author Joe Martinez
I have the following query:

select * from products
left outer join vendorproducts on
prodbarcode=vpupc and prodsource=vpvendor
where vpcost = 0
or vpcost is null

I'm using a TIBOQuery.

The query executes fine. I am able to retreive the number of rows. No
problem there.
Then I start scrolling through the dataset. I come to a row where a
record in products matches more than one record in vendorproducts. IBO
gives me the following error:

Multiple rows in singleton fetch.
Check KeyLinks and JoinLinks properties.
select * from products
left outer join vendorproducts on
prodbarcode=vpupc and prodsource=vpvendor
WHERE PRODBARCODE=? /* BIND_0 */

This worked perfectly fine before, under the BDE.

I would be happy to check the KeyLinks and JoinLinks, except that this
is a dynamic query, typed in by the user. The user doesn't have access
to those properties. Even if I gave them access, they shouldn't have to
mess with those as an end user. It is a valid SQL statement, so it
should work, right?

I do also have a "detail" TDBGrid, linking the above query to a
TIBOTable (vendorproducts) in a master/detail relationship
(MasterSource, etc.) on prodbarcode=vpupc. Could that be what's
complaining? TIBOTable doesn't have a JoinLinks property. I tried
setting KeyLinks to VPVENDOR and VPVENDPARTNO (the key fields for that
table), but it didn't make a difference.

Help!

-Joe