Page 1 of 1

Master/Details Insert

Posted: Wed 25 Jan 2006 09:12
by Guest
Suppose we have two DataSets - OraQuery1 (master dataset, has ID) and OraQuery2 (detail dataset, has master_id). Link between'em is id = master_id. I need to insert one record into master and may be several records into details dataset. During insert OraQuery1.FieldByName('id').Value = null, and OraQuery2.FieldByName('master_id').Value = null too. But after OraQuery.ApplyUpdates i can give new value of master.id (suppose value is equal NewID). And if i try to set details.master_id values to NewID by OraQuery2.FieldByName('master_id').Value = NewID, then nothing happens, 'cos during OraQuery1.ApplyUpdates OraQuery2.Refresh happens and all new data loses.
So, the question is - How to disable refresh details dataset during ApplyUpdates of master dataset is working?

Posted: Fri 27 Jan 2006 16:06
by Challenger
We need more detailed description of your situation. Do you set CachedUpdates property to True for both queries?