Subject Re: [IBO] TIBOQuery - master child relationship
Author Helen Borrie
At 12:45 PM 16/08/2007, you wrote:
>I have used TIBOQuerys as children in a number of master / child
>relationships without problem. However I have one query that gets
>results from a Stored Procedure that is failing
>The SQL is
>FROM Pr_ItemSellPrices (:ItemRef, 'T') isp
>I have the mastersource

I assume you mean Datasource. TIBOQuery doesn't have a Mastersource property.

>pointing to a datasource with a 'ItemRef' field
>however this doesn't seem to trigger. Any ideas?

A few things:

1. Make sure the SP actually is a selectable procedure. If it
doesn't return its output via a SUSPEND statement, it's not a
selectable procedure.

2. What's the actual fieldname of the linking key? Is it ItemRef or
"ItemRef"? They're not the same.

3. Is ItemRef in the master a unique key? The M/D linkage will be
garbled if it's not.

4. And I suppose this should be the first check: have you actually
tested the SP independently, with parameters, to see whether it
returns the output you expect?