How to save the dataTable after adding fields into it?

Aug 31, 2012 at 1:23 PM

I get  the dataTable of  a  layer in the map and add some fields into it. I have written the following codes: layer.DataSet.Save(); But if I don't remove this layer first, the dataTable seems not to be saved and closed, and it will influence other functions which also call the layer.

If I remove the layer and then add it to the map again, the dataTable is feally saved, and it will not influence other functions.

How to save the layer after adding fields really?