Re: In-Memory Dataset




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
>
>

.



Relevant Pages

  • Re: Using Access for a multi user system
    ... Master. ... So not only do you not understand "overkill", ... "snapshot" either. ... Idiot. ...
    (comp.databases.ms-access)
  • Re: Howmessy
    ... MPE/iX uses prefetching and IMAGE is all mapped I/O. ... earlier I asked for a LISTF,2 of the master dataset, what I wanted to see ... Until such time as we know the size of the master record and the size of the ... To join/leave the list, search archives, change list settings, * ...
    (comp.sys.hp.mpe)
  • Re: Master/Detail with ADODatasets (again)
    ... >parameter (I presume we are talking of using the CommandText ... When you put code in the AfterScroll event of the Master dataset to fetch detail ...
    (borland.public.delphi.database.ado)
  • Re: Master/Detail with ADODatasets (again)
    ... Retrieving the patient surnames from the master table ... parameter (I presume we are talking of using the CommandText ...
    (borland.public.delphi.database.ado)
  • Re: Question for TADOTable + MSSQL
    ... TadoDataset.dataset points to the master dataset ... Set parameters in the Detail commandtext using the same name as field names from ... The parameters will get their values from the master record. ...
    (borland.public.delphi.database.ado)