Subject Re: [IBO] Master-Detail query and much more... Help.
Author Artur Anjos
A small changes in your Detail Query:

SELECT ENC_DET_NUM_ENC, ENC_DET_ARTIGO,
ENC_DET_ARMAZEM,
ENC_DET_QT_ENC, ENC_DET_QT_A_SATISFAZER,
ENC_DET_QT_ANULADA,
ENC_DET_QT_SATISFEITA
FROM ENC_DETALHE
WHERE
/* Here, to match the name of the master */
AND ENC_DET_NUM_ENC = :ENC_GERAL_NUM_ENC
AND ENC_DET_ARMAZEM = :arm
AND ENC_DET_ARTIGO = :artigo

And if you are using a TIBOQuery, set the DataSource Propriety to point at the Master DataSource. Now you have the relation done!
You just need to set the other two parameters and IBO takes care of the rest for you.

> The detail query should be editable, the user can edit
> only one field (qty_to_sat).
> I want that the user update this value within the
> grid. How can I pass the value in that grid column to
> update the field in the table? Should I use a
> TIBOUpdateSQL ?

For this one you must set EditSQL to something like:

UPDATE ENC_DETALHE SET ENC_DET_QT_A_SATISFAZER=:ENC_DET_QT_A_SATISFAZER
WHERE ....

Ops, I don't know if you have a keylink for this table.

Anyway, I send you something to work.

Artur

PS: (Seria melhor para ambos escrever em portugues, hehehe - envia-me um mail em privado se necessitares)



[Non-text portions of this message have been removed]