Re: In-Memory Dataset
- From: "Michelle Brennan" <mibi222@xxxxxxxxxxx>
- Date: 26 Oct 2005 16:17:21 -0700
I also do think it's an overkill, but I didn't understand how
all the other posts would solve my problem and I tried many
different things.
For instance, getting client side keys (whichever method may
be available, GUID, keytable, non-key identity field etc) will
not solve the master-detail link problem.
When I post detail after manually setting master and foreign
keys, the detail record simply *disappears*. From what I
understood, the only way for any of this to work is to post
the master dataset BEFORE posting detail (please correct me if
I'm wrong).. but I don't want that.
Posting master dataset puts the Order back to browse mode and
messes up the logic because I depend on the Order being in
Insert mode while new detail items are being added (posted).
I think this is the main problem. Master-detail linking during
insert mode and not having to post master first.
I think I tried just about everything, and the only way I found
is to eliminate any kind of linking between master and detail
(only during inserts) by creating a totally independent memory
table based on the detail data structure.
This issue has been taking me waaay too long to solve without
a definitive solution, or at least one that I can understand.
I'm sort of new to Delphi so my knowledge is limited.
If you can post some sample code or give me some step by step
logical pseudocode, I'd greatly appreciate it.
By the way, about the commandtext, I figured it out, and it
worked, but I would like a better solution than this!
Thanks for your help!
"Vitali Kalinin" <vitkalinin@xxxxxxxxx> wrote:
>I think that yours workaround is overkill, but if you still think that this
>is the way to go, then you could just put in commandtext of TADODataSet
>someting like this:
>select * from <detail_table> where 1=2 and switch it to BatchOptimistic
>mode, just don't call BatchUpdate for this inmemory dataset and you will get
>what you need.
>
>Regards,
>Vitali
>
>
.
- Follow-Ups:
- Re: In-Memory Dataset
- From: Vitali Kalinin
- Re: In-Memory Dataset
- From: Brian Bushay TeamB
- Re: In-Memory Dataset
- References:
- In-Memory Dataset
- From: Michelle Brennan
- Re: In-Memory Dataset
- From: Vitali Kalinin
- In-Memory Dataset
- Prev by Date: Read data from Access databas
- Next by Date: Re: Problem connecting to DBF files using ADO
- Previous by thread: Re: In-Memory Dataset
- Next by thread: Re: In-Memory Dataset
- Index(es):
Relevant Pages
|