OData: issue with MaxRecords


Is still an an issues with this code.

If MaxRecords is -1,

 if not VarIsNull(lQuery.Top) then
    lSimpleRequest.MaxRecords := Min(lQuery.Top, MaxRecords);

lQuery.Top will be ignored and the result of
lSimpleRequest.MaxRecords will be -1

This issue is prezent and in Data Abstract

Logged as bugs://D19182.

Logged as bugs://D19183.


You can change it to

if not VarIsNull(lQuery.Top) then begin
  if MaxRecords > 0 then
    lSimpleRequest.MaxRecords := Min(lQuery.Top, MaxRecords)
    lSimpleRequest.MaxRecords := lQuery.Top;
1 Like

bugs://D19182 was closed as fixed.

bugs://D19183 was closed as fixed.