Subject Re: [IBO] ibloockupcombobox - configure
Author Ronaldo Rezende Vilela Luiz
I have 2 tables:
Table Atividades:
, (select "descricao" from "modalidades" where "modalidades"."id" =
"atividades"."modalidade_id") as "modalidade"
, "dia"
FROM "atividades"


Table Modalidades:
FROM "modalidades"
(id, descricao)

The problem is in the updateSQL. I don't know what I must do. Take a look in
my insertSQL:
INSERT INTO "atividades"(

How can I insert the field modalidade_id in table Atividades? It doesn't
exist in my selectSQL. I only have the loockup field modalidade.

To insert and update the fields using the IB_QUERY or IBOQUERY I must set
the insertSQL and updateSQL ?

Ronaldo Rezende
Programador Delphi
Uberaba, MG - Brasil
cursando Sistemas de Informa��o
na Universidade de Uberaba

""Helen Borrie (TeamIBO)"" <helebor@...> escreveu na mensagem
> At 02:00 AM 22-03-02 -0300, Ronaldo Rezende wrote:
> >I'm trying to configure the iboloockucombobox. When I try to configure
> >updates statements, an error is generated. If I have this query for the
> >table, what I must put in the query for updateSQL? If I click in the
> >generate for table, the code is not correct. My colunm in the main table
> > But in the select I don't use it. How can I refer to it
> >the updateSQL?
> >
> >SELECT "id"
> > , (select "descricao" from "modalidades" where "modalidades"."id" =
> >"atividades"."modalidade_id") as "modalidade"
> > , "dia"
> >FROM "atividades"
> Ronaldo,
> 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
> Keylinks:
> KeyDescLinks:
> descricao=modalidade
> 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
> regards,
> 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
> IB Objects - direct, complete, custom connectivity to Firebird or
> without the need for BDE, ODBC or any other layer.
> - your IBO community resource for Tech Info
> keyword-searchable FAQ, community code contributions and more !
> Your use of Yahoo! Groups is subject to