PC Review


Reply
Thread Tools Rate Thread

Changes in Merge in ADO.NET 2.0

 
 
JezB
Guest
Posts: n/a
 
      22nd Jul 2005
I've moved to framework 2.0 and code that used to work now doesn't. I have a
typed dataset:

FlavourData d;

Now I want to filter the dataset so that I leave updated rows in one
particular table only (the "Flavour" table). To do this I first apply the
GetChanges method to the table that I'm interested in. GetChanges called in
this way returns an un-typed DataTable object:

DataTable upd = d.Flavour.GetChanges(DataRowState.Modified);

I need to translate this back into a typed dataset of type FlavourData, so I
create a new object of that type and merge the contents of my DataTable into
it:

FlavourData updates = new FlavourData();
if (upd != null) updates.Merge(upd,true,MissingSchemaAction.Ignore);

This worked fine in version 1 of the framework, but in framework 2 (beta 2),
even if my upd DataTable contains 2 rows after the GetChanges method has
been applied, the Merge results in an empty typed dataset.

Is this a bug ? What should I do to get round it ?


 
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
mail merge excludes my headers and critical data in Word merge =?Utf-8?B?Tml4?= Microsoft Excel Misc 0 21st Apr 2006 08:35 PM
Printing a mail merge doc, merge fields print with grey background =?Utf-8?B?U3RhbmJ5?= Microsoft Word Document Management 1 12th Apr 2006 03:21 PM
Insert Merge Field problem with Word-Mail Merge from Excel documen =?Utf-8?B?QXVndXN0YSBFLg==?= Microsoft Word Document Management 2 20th Jun 2005 10:59 AM
How to merge columns and rows into one cell, besides using the Merge and Center icon? valerie Microsoft Excel Misc 1 17th Oct 2003 05:39 PM
Mail Merge using MS Word and Outlook-Unable to merge Contacts data John O'Grady Microsoft Outlook Contacts 0 24th Jul 2003 12:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:01 PM.