Subject | Re: [IBO] Master-Detail query and much more... Help. |
---|---|
Author | Artur Anjos |
Post date | 2002-02-16T00:13:48Z |
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.
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]
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 editFor this one you must set EditSQL to something like:
> 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 ?
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]