0
votes

This is about C# typed dataSets

I have a typed dataset, I have used a partial class of the Row of the datatable and have added a new public int to it.

I can set that int, but when i call the Merge() to merge a bunch of data together the added public int is lost (goes back to 0).

Anyone encountered this before?

1

1 Answers

0
votes

I suppose you have added the new int-property to the Cs-sourcecode only.

if you edit the xsd-file that belongs to the dataset with visualstudio and add the int-field there (into the xsd) your dataset sould be regenerated and contain the new int-field as property. Merge(), GetXml() .. should work as expected. The new value is not automatically persisted into the database.