hi,
i have a x:TDAMemDataTable
now i have several x’s created who all hold some records
i want to aggregate all those records in a new x
so basically
y = new x
for xlist
y.CopyRecordSet(xlist[i])
i would have expected y to contain all recs from all x’s
is there another method that i can use to kinda ‘clone’ reords into a new combined memtable?
now which seems to do the job, i need to alter the primkey of the cloned record (otherwise i have duplicate pk’s and that does not work in the code that follows)
but thx for the sample, it’ll come in handy…
even when using Last the record does not get inserted at the end (that’s why i asked )
so now cloneselected always insert at the front, and i’m sorting the dataset afterwards which gives the desired result
but i would have expected Last to do the trick also (i don’t need the bookmark since i’m aggregating datasets)
some kind of internalsort for recID
but no problem, it works
the only thing i see is that sorting changes the value of the RecId field itself…
if i cloneselectedrecord and the value in the original is 2 and 4 for example, sorting will result in 1 and 2
which isn’t a problem but if you would ever change that my code will break…