i use .LoadFromRemotesource to pull in records on demand in a TDACDSDataTable
pulling in 1 record at a time
after .LoadFromRemotesource the current record is the one that got pulled in when using TDACDSDataTable, so i can directly manipulate given data
now if i do the same with TDAMemDataTable this code does not work anylonger cause the first record becomes the active one instead of the last record, thus breaking my code and it does not make sence that the first record becomes the selected one…
i’ve looked into the source but i don’t see a direct reason for this, i guess i’ll boil down on how the data is pulled in, didn’t get that far…
the question is: is this the desired behaviour or is this a known issue with TDAMemDataTable?
and further: are there other things to check / take into account when changing from TDACDSDatatable to TDAMemDataTable?
that implies i have to change all code relying on LoadFromRemotesource…
and i don’t see how the behaviour of the CDSDatatable is different since they both derive from tdatatable?
i guess the default for loadfromremotesource (which i find more explanatory then Fill) should be appendmode true?
the dataset gets filtered, but before the loadfromremote the tdamem.filter:=false
is filtering creating an index in TdaMem?
otherwise there is no autosorting of index being used explicitly…
but i set filtered to FALSE before the loadfrom call…
and i don’t set the filtered to true before i try to alter the pulled in data…
so that does not apply?
selected position before LoadFromRemoteSource will be selected again
that is not the desired behaviour…
i yet fail to understand the difference in behaviour between CDS and MEM
and the CDS behaviour is the right one imho?
I think, I need simple testcase with both components and similar code that demonstrates this behavior.
after reviewing, I can say what and where is wrong.
complicated code in your project could change default behavior and causes mess because you could adapt it for CDS component many years ago
that is also requiring a lot of rewrite cause we still have a lot of DA3 tables
this is one of those…
and we use loadfromremotesource a lot… to pull in a record or a set of records based on a parameterized where