Subject Re: [IBO] Re: Invalid reference to delete
Author Helen Borrie
At 04:57 PM 29/01/2005 +0000, you wrote:


>Perhaps it would be easier to ask what should I have in these
>properties?

:-) Yup. "All is revealed".


>The Join in this query is only for purposes of the Order by, where I
>am using the I.NON_SEED_ITEM to sort along with II.ITEMNAME.
>
>I have the following settings:
>
>KeyLinksAutoDefine: unchecked
>
>KeyRelation: INVOICEITEMS
>
>KeyLinks: INVOICEITEMS.ITEMNUM=ITEMS.ITEMNUM

This is wrong. That syntax of KeyLinks, along with the KeyDescLinks
property, have nothing to do with your current situation (they are used for
implementing the KeySource-Lookup relationship).

Change your KeyLinks to
INVOICEITEMS.IDNUM


>KeyDescLinks: blank
>
>JoinLinks: blank
>
>SQL:
>
>SELECT II.IDNUM
> , II.ORDERNUM
> , II.INVOICENUM
> , II.ITEMNAME
> , II.ITEMNUM
> , II.ETD_DATE
> , II.QTY_ORDER
> , II.QTY_SHIP
> , II.UNITS
> , II.COST
> , (II.QTY_ORDER * II.COST) AS COST_ORDER
> , (II.QTY_SHIP * II.COST) AS COST_INVOICE
> , NULLIF(II.LOTNUM, 0) AS LOTNUM
> , II.TREATMENT
> , II.PACKING
> , II.GERM
> , II.DATEGERM
> , II.NOTE
> , II.COMPLETE
>FROM INVOICEITEMS II
>JOIN ITEMS I ON I.ITEMNUM = II.ITEMNUM
>ORDER BY I.NON_SEED_ITEM, II.ITEMNAME

Helen