Subject RE: [IBO] Record was not located to update
Author Helen Borrie
At 02:52 PM 07-08-01 +0200, you wrote:
>I have KeyLinksAutoDefine checked, otherwise the Keylinks is empty.
>
>Detail query is :
>select ID (PK,FK)
> , ROW (PK)
> , DOCNO
> , NAME
> , REGNO
> , AMOUNT
> , ACCOUNT
> , BANK
> , (select name from bank where bank.swift=mass_detail.bank) as bankname
> , BREF
>FROM MASS_DETAIL
>order by id,row
>for update
>
>FK is tied to master tables ID field, cascade in update and delete.
>Should I put anything into Keylinks and KeyDescLinks? Is there troubles with
>foreign key?

I think this might be a case where IBO can't determine the KeyLinks automatically because part of the primary key of the detail is the masterlink. Make keylinksautodefine false and explicitly enter KeyLinks as:
ROW
ID

Is ROW coming from a generator? If so, why do you need the composite primary key?

Ignore KeyDescLinks - it is not part of the master-detail paradigm - it is used in combination with KeySource for lookup tables for a specific purpose.

-- helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________