开发者

Typed DataSet merge issue

开发者 https://www.devze.com 2023-01-26 22:00 出处:网络
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.

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 m开发者_运维问答erge a bunch of data together the added public int is lost (goes back to 0).

Anyone encountered this before?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消