Altering a serialized DataSet

A

Arian T. Kulp

I created an application that makes use of a typed DataSet for holding its
data. This DataSet is saved out with simple XML serialization. Now, after
having deploying the application to a number of people, I'd like to add a
new DataColumn to one of the tables. I added the new column to the DataSet
designer, but now it chokes when reading in a "legacy" data file since the
column is, of course, missing. The data type is Boolean, and I set a
default value thinking that a missing column in the file would be OK. Do I
have to dispense with the typed DataSet and just work with it manually now?

It seems that the typed DataSet works as long as I never refer to a column
property. In other words, I can't say row.NewColumn, but I can say
row["NewColumn"]. Is this just how it is with DataSet XML serialization?

Thanks!
-Arian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top