BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Update CDSDetail with joined fields from some large Master t

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Nelson Chui
Guest





PostPosted: Mon Oct 27, 2003 10:57 am    Post subject: Update CDSDetail with joined fields from some large Master t Reply with quote



Hi,

I don't know how can I insert / update / delete a Detail CDS ( some
field is joined from other large master tables ).

Simplified my case :-

Header's Data fields := MEMO_NO, MEMO_DATE, CUSTOMER_CODE.

Detail's Data fields := MEMO_NO, TX_SEQ.

TDataSet of Detail's SQL :-
SELECT
D.MEMO_NO, D.TX_SEQ, L.STOCK_CODE, M.STOCK_NAME
FROM
T_DETAIL D
LEFT JOIN T_LEDGER L ON D.TX_SEQ = L.TX_SEQ
LEFT JOIN T_STOCK M ON L.STOCK_CODE = M.STOCK_CODE
WHERE
D.MEMO_NO = :MEMO_NO

When CDSHeader is called ApplyUpdates, the SQL Monitor is only shown
[Prepare] TDataSet of Detail for query SELECT and there is only Insert /
Update / Delete done on TDataSet of Header.

I also try to attach TIBUpdateSQL to TDataSet of Detail with proper
insert/update/delete SQL statements, but there is nothing to use after
CDSHeader's ApplyUpdates.

If the Detail's Data fields is on its own field MEMO_NO, TX_SEQ, the
CDSDetail is done correctly.

Would you give me some advice ?

Regards,
Nelson.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.