Scenerio:
I want to add a calculated field to given (any) dataset during runtime. I don't know any other way to obtain a dataset structure other than performing DataSet.Open
method.
But the Open
method causes that atleast one row of a data needs to be transfered from server to client. Then I need to close the DataSet, add field and reopen it. This is an unnecessery overhead in my opinion. Is there a better way of doing this? Please not that I want to be able adding a calcuated field to any dataset and I don't know its structure prior to opening.
In pseudocode it looks like this:
DataSet.Open;
DataSet.Close;
RecreateFieldsStructure;
AddCalculatedField;
DataSet.Open;
Thanks for your time.