TDAParamCollection are declared and used on the ancestor level (i.e. in the TDADataTable class) so DAD processes this object in the same way for descendants (MEM and CDS tables).
DAD passes this collection to server-side so server-side uses these parameters for filtering data received from database.
simple example:
create any SELECT with parameter like select * from mytable where field1 = :field1
In some historic code I saw this
FBestellingStock.Params.ParamByName(‘Bestelling’).AsInteger := BestellingPK; // do not localize
FBestellingStock.Params.ParamByName(‘Leverancier’).AsInteger := Leverancier; // do not localize
lParams := TXLSParams.Create;
lParams.Clear;
for i := 0 to FBestellingStock.Params.Count - 1 do
lParams.AddParam(FBestellingStock.Params.Params[i]);
FBestellingStock.DataRequestCall.ParamByName(‘Parameters’).Value := lParams.Text; // do not localize
FBestellingStock.Open;
which was the reason I asked the question.
So this is completely redundant, correct?
Do the Params do anything after the open? In particular when the dataset changes?
Filter or sort the dataset somehow?
I don’t expect it to but I am trying to explain behaviour difference in TDACDSDataTable and TDAMemDataTable.
you are using DA3 style that was actual is about 16+ years ago when one RDA could handle one table.
nowadays, one RDA can handle several tables and DA3 behavior can be considered as outdated.
Params are used before opening table only - they are sent to server-side for filtration of data in SQL request.