PC Review


Reply
Thread Tools Rate Thread

Altering a serialized DataSet

 
 
Arian T. Kulp
Guest
Posts: n/a
 
      20th Dec 2005
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


 
Reply With Quote
 
 
 
 
Sahil Malik [MVP C#]
Guest
Posts: n/a
 
      25th Dec 2005
Are you writing the schema out alongwith the XML data? If so, then yes you
would get this problem.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
__________________________________________________________


"Arian T. Kulp" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL XML query and serialized DataSet Fred Microsoft ADO .NET 0 5th Jun 2008 09:20 AM
SQL XML query and serialized DataSet Fred Microsoft Dot NET 0 5th Jun 2008 09:20 AM
Serialized ADO.NET 1.0 dataset compatible with ADO.NET 2.0 Kay-Christian Wessel Microsoft ADO .NET 5 6th Feb 2006 02:46 PM
Serialized dataset bug? Rob C Microsoft ADO .NET 0 10th Nov 2003 08:19 PM
XML Structure serialized in Disk for a dataset José Joye Microsoft Dot NET 0 11th Sep 2003 10:44 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:04 AM.