Subject Re: [IBO] ibloockupcombobox - configure
Author Helen Borrie (TeamIBO)
At 02:00 AM 22-03-02 -0300, Ronaldo Rezende wrote:
>I'm trying to configure the iboloockucombobox. When I try to configure the
>updates statements, an error is generated. If I have this query for the main
>table, what I must put in the query for updateSQL? If I click in the button
>generate for table, the code is not correct. My colunm in the main table is
> But in the select I don't use it. How can I refer to it in
>the updateSQL?
>SELECT "id"
> , (select "descricao" from "modalidades" where "modalidades"."id" =
>"atividades"."modalidade_id") as "modalidade"
> , "dia"
>FROM "atividades"

Assuming you have the standard Keysource-Lookup setup, the lookup dataset
should not have any impact on the EditSQL for the main dataset - not
standard EditSQL that IBO generates automatically, nor custom EditSQL that
you apply to the main dataset yourself.

If the two datasets are properly configured and linked, any new lookup
value passed from the lookup dataset to the main dataset via the KeyLinks
linking will be applied during the dssEdit phase and will simply pass to
the EditSQL statement as a parameter when the update is posted.

I need to assume that your lookup dataset has SQL similar to:

SELECT id, descricao from modalidades

Assuming the TIB_Datasource for the main dataset is dsMain, the lookup
query will have the following properties set:

Keysource: dsMain



This should do the trick.

It would be helpful if you could show us what is failing in your custom
EditSQL. It is possible that you are getting some error because you are
attempting to apply some sort of updating to the sub-selected "as
modalidade" field...this will cause errors, because it is not a database field.

Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at