https://blog.dummzeuch.de/2014/07/12/adding-fields-to-a-tdataset-in-code/
Adding fields to a TDataset in code