Subject Re: [IBO] Record editing with Lookupcombo
Author Helen Borrie
At 02:54 PM 23-07-01 +0300, you wrote:
>Hi!
>
>I have grid with TIB_Lookupcombo in it
>It's datasource is:
>SELECT ID , NIMI FROM KULULIIGID
>Keylinks: ID=KULU
>KeyDesclinks: NIMI=KULUNIMI
>
>My grids query is:
>SELECT MAJA,AASTA,KUU,KULU
> , (select NIMI from KULULIIGID where ID=KULUD.KULU) as
>KULUNIMI
> , SUMMA , TARIIF
>FROM KULUD
>JOIN KULULIIGID on id=kulud.kulu
>where NONDELETE=0 AND MAJA=:MAJA and AASTA=:AASTA and
>KUU=:KUU and tariif=:TARIIF
>for update
>(I'm using UpdateSQL to insert,edit and delete data)
>
>The problem is with Lookupcombo - I can't change the
>values. I can Insert new record, I can delete record, I can
>edit other fieds, but when I want to change the KULUNIMI
>from LookupCombo, then nothing happens (dropdown opens but
>I cant select other row from there).
>
>What am I missing?
>BTW, I'm using IBO 4.0.1232

Riho-Rene,

Check the KeyLinks of the main dataset and make sure it is unique.

Make sure you have the KeySource defined for the lookup dataset.

However...

I think the relationship between the main dataset and the lookup dataset is suspect anyway., because the KeyLinks linkage from the lookup dataset to the main dataset references itself, through the join. IOW, i think it's possible this can't work like this, i.e. changing this value would violate all of the contributing relationships. It's a circular reference.

fwiw

Helen

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