Board index » delphi » Inserting new records with Master/Detail relationship and batch updates

Inserting new records with Master/Detail relationship and batch updates

Hi all:

How can I append two TADODataSets joined by the master/detail relation with
the third one? I need to use the batch updates on the first two and the
third is in optimistic locking mode.

Alex

 

Re:Inserting new records with Master/Detail relationship and batch updates


Quote
>How can I append two TADODataSets joined by the master/detail relation with
>the third one? I need to use the batch updates on the first two and the
>third is in optimistic locking mode.

Update the batch and use an Insert Query or iterate through the master and
detail records and insert the records via code.
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Inserting new records with Master/Detail relationship and batch updates


Too much coding involved in this, which nullifies the advantages of the data
bound controls. I found that it is way simpler to disconnect the detail
query from a DataSource and set a parameter value manually during the append
operation. Three lines of code instead of 30 something. When the record is
appended, I assign DataSource again.

Alex

"Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message
news:h51prtcqfq7lt8pk6jsrrohjb2urrp2cj4@4ax.com...

Quote

> >How can I append two TADODataSets joined by the master/detail relation
with
> >the third one? I need to use the batch updates on the first two and the
> >third is in optimistic locking mode.

> Update the batch and use an Insert Query or iterate through the master and
> detail records and insert the records via code.
> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Other Threads