Scenerio:
I want to add a calculated field to a given (any) dataset at runtime. I do not know of any other way to get a data set structure different from the method execution DataSet.Open.
But the method Opencauses at least one row of data to be transmitted from server to client. Then I need to close the DataSet, add a field and reopen it. In my opinion, this is an extra overhead. Is there a better way to do this? Please do not want me to be able to add a calculated field to any data set, and I do not know its structure before opening.
In pseudo code, it looks like this:
DataSet.Open;
DataSet.Close;
RecreateFieldsStructure;
AddCalculatedField;
DataSet.Open;
Thank you for your time.