Web Core / XData Service Query Example

Hi @AndrewSimard,

To start with, awesome words! Thank you for your compliments, I hope we can quote this and spread the work about Web Core and XData! :wink:

Regarding your post, also thank you for the detailed information. I'm sure this will be useful for many users searching the Support Center and finding such information you provided. A good summary.

Finally, about your specific question: I see you also posted a similar question here. It should actually be pretty simple, so I'm falling to see what are you struggling with. Maybe the whole point is that you trying to deal with FieldDefs, while what you should be doing is just to create persistent fields (the ones that go eventually in Fields).

Have you tried to just dynamically create the dataset fields, as it's usually done in Delphi? Like:

var
  T: TStringField;
begin
  T := TStringField.Create(DataSet1);
  T.FieldName := 'LastName';
  T.DataSet := DataSet1;
end;