Migration problem going from TDACDSDataTable to TDAMemDataTable

Thanks, logged as bugs://85205

Hi,

pls update uDAMemDataset.pas as

procedure TDAMemoryDataset.RecordNotification(Buf: PMemDatasetrecord_Native; Operation: TMemDataSetNotification);
..
      mdnModify:
..
         else if FilterMasterRecord_OneRecord(Buf) then begin
..
         end
// this block was added
         else begin  
           RecordNotification(buf, mdnDelete);
           Exit;
         end;
// end block
      mdnDelete:

ok thx
i guess this will be in the next release?

bugs://85205 got closed with status fixed.

yes, it will

any timeline on that? (stable release release?)

we usually release new builds at Wednesday (biweekly)

bugs://85170 got closed with status nochangereq.

another difference
it seems that CDS is calling oncalcfield event a lot less then MEM
.edit for example triggers that event
in our case in a given circomstance the timings went form 10 to 20 secs to perform the same (just looping over the records to change a boolean field)
any ideas on that?
so one could assume that MEM is calling oncalc at least the double amount of times…

and is an oncalcfield not being cached in any way?

Hi,

MemDataset doesn’t cache calculation fields.
we use default TDataset logic.

from TDataSet.OnCalcFields Event :

you may try to change AutoCalcFields property as

table.Dataset.AutoCalcFields := False;

i get that but the issue remains in that MEM does call oncalc far more then CDS…

Hi,

if you look at TDAMemoryDataset (uDAMemDataset.pas), you will see that we don’t call OnCalcFields additionally.
it does standard TDataset only.


btw, you can declare your fields as usual fields (Calculated = False, LogChanges = False) and recalculate values manually.

hi Evgeny,
can you confirm that writing a string value to batabase string field using CDS behaves differently then MEM?
it is my impression that 'this is a product name ’ will truncate the trailing space using CDS but not with MEM…
didn’t test it yet so i’m trying my luck here

Hi,

MEM stores value as is, i.e. you can put X spaces and all of them will be here.

if you need to store truncated version, you should do it manually like

fld.value := Trunc('  sss  ');

so CDS processes it differently then… iirc you mentioned a property that alters CDS behaviour?

we talked about using Boolean in filters. but you decided to avoid using it (Variant(True) = -1) so I closed that issue w/o fixing

ok

6 posts were split to a new topic: Migration problem going from TDACDSDataTable to TDAMemDataTable (part 2)