Subject Re: [IBO] ibloockupcombobox - configure
Author Helen Borrie (TeamIBO)
At 03:15 AM 22-03-02 -0300, you wrote:
>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.

If the field atividades.modalidade_id may be changed in your application,
then you need to include it in the dataset. You do not need to display it
in the grid - simply set its FieldsVisible attribute to False.


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

No - IBO will do this automatically. Custom SQL - which is a statement in
the relevant xxxxxSQL property - is not needed unless, for example, you
want to call a stored procedure INSTEAD of IBO's conventional update behaviour.


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