How to select only a few records

Have a Table with 10 records

TXDataWebDataSet1 points to the data
There is a stringfield called X that is either a or b. five of each
With TXDataWebDataSet1.QueraString set to ''
TXDataWebDataSet1.recordcount gives 10;
but
TXDataWebDataSet1.close;
TXDataWebDataSet1.Querystring := '?$filter=X eq ' + QuotedStr(a);
TXDataWebDataSet1.load;

then waiting forr TXDataWebDataSet1.AfterOpen to finnish
Now TXDataWebDataSet1.recordcount still gives 10
AND
TXDataWebDataSet1.first;
i := 1;
REPEAT
Do something with TXDataWebDataSet1
INC(i);
TXDataWebDataSet1.next;
UNTIL TXDataWebDataSet1.eof
and looking at i shows that i is 10

So how make a SELECT than makes my TXDataWebDataSet1 to only hold five of my records

Please open your browser Network tab (F12) and check exactly how the HTTP request in being performed - what is the request URL and what is the JSON response.

Thanks but wrong data in gives wrong data out my bad programing
Now solved

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.