Subject | Re: [IBO] ibloockupcombobox - configure |
---|---|
Author | Ronaldo Rezende Vilela Luiz |
Post date | 2002-03-22T06:15:34Z |
I have 2 tables:
Table Atividades:
SELECT "id"
, (select "descricao" from "modalidades" where "modalidades"."id" =
"atividades"."modalidade_id") as "modalidade"
, "dia"
FROM "atividades"
and
Table Modalidades:
SELECT *
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"(
"modalidade_id",
"dia")
VALUES (
:"modalidade_id",
:"dia",
:"classificacao")
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
ronaldim@...
-----------------------------------------
Programador Delphi
Uberaba, MG - Brasil
cursando Sistemas de Informa��o
na Universidade de Uberaba
....
""Helen Borrie (TeamIBO)"" <helebor@...> escreveu na mensagem
news:5.1.0.14.0.20020322162021.0272a100@......
Table Atividades:
SELECT "id"
, (select "descricao" from "modalidades" where "modalidades"."id" =
"atividades"."modalidade_id") as "modalidade"
, "dia"
FROM "atividades"
and
Table Modalidades:
SELECT *
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"(
"modalidade_id",
"dia")
VALUES (
:"modalidade_id",
:"dia",
:"classificacao")
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
ronaldim@...
-----------------------------------------
Programador Delphi
Uberaba, MG - Brasil
cursando Sistemas de Informa��o
na Universidade de Uberaba
....
""Helen Borrie (TeamIBO)"" <helebor@...> escreveu na mensagem
news:5.1.0.14.0.20020322162021.0272a100@......
> At 02:00 AM 22-03-02 -0300, Ronaldo Rezende wrote:the
> >I'm trying to configure the iboloockucombobox. When I try to configure
> >updates statements, an error is generated. If I have this query for themain
> >table, what I must put in the query for updateSQL? If I click in thebutton
> >generate for table, the code is not correct. My colunm in the main tableis
> >modalidades.id. But in the select I don't use it. How can I refer to itin
> >the updateSQL?field.
> >
> >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:
> modalidades.id=atividades.modalidade_id
>
> 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
> www.ibobjects.com
>
>
>
>
> IB Objects - direct, complete, custom connectivity to Firebird orInterBase
> without the need for BDE, ODBC or any other layer.___________________________________________________________________________
>
> http://www.ibobjects.com - your IBO community resource for Tech Infopapers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>