Re: The infamous DataSet.Merge command...

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Rob R. Ainscough (robains_at_pacbell.net)
Date: 01/13/05


Date: Thu, 13 Jan 2005 14:32:26 -0800

Sahil,

The books I've read by Sean Campbell, Scott Swigart, Bob Carver, Patrick
Barnes, Jim Pragit, Oz Rugless, Kris Horrocks, Steve Holzner, Bob Howell,
Rick Dobson, Evangelos Petroutsos, Mark Ridgeway, Ed Robinson, Michael Bond,
Robert Ian Oliver, Graeme Malcom (70% of those are Microsoft press books).

Unfortunately not a single one of these authors/books mentions Merge nor how
to use it -- this seems odd to me, considering the potential power of Merge
it seems strange that it was omitted.

IMHO, the implementation of Merge has become so generic in nature (as it
does indeed try to do it all) that perhaps it would have just been better to
leave Merge out of .NET. It is one of those methods that raises more
questions than answers and solutions.

Some of the MSDN documention on Merging datasets
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskmergingdatasets.asp
-- not exactly helpful

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatasetclassmergetopic.asp
-- again not very helpful and the samples are like "who would want to do
this" -- just not a good demonstration on Merge

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatasetclassmergetopic3.asp
-- again nothing practical in terms of merging two datasets from database
sources

and critical details like: .AcceptChangesDuringFill = False needs to be
set or else the .Update will do nothing. If you search the various
boards/newsgroups, you'll see that many have just given up on Merge and
coded their own methods. MS went over the deep end in abstraction on
Merge -- sorta like Apple with the RISC vs. CISC debate -- the best solution
being a little of both. Merge should have a CISC like method -- certainly
for identical datasets just different database sources.

"Sahil Malik" <contactmethrumyblog@nospam.com> wrote in message
news:e3Xr9sb%23EHA.3988@TK2MSFTNGP11.phx.gbl...
> Rob,
>
> How else would you merge two datasets? The disconnected dataset model
> gives
> you a merge and in all situations it does what is the most logical thing
> to
> do.
>
> There could be many conditions and if you write quick small snippets of
> code, and before subjecting merge to those conditions, if you were to ask
> yourself "If I were writing a catch all one size fits all merge, what
> would
> be the right decisions to take?" - you'd see Merge does exactly what is
> the
> most logical thing to do.
>
> Not to mention, Microsoft has a huge army of MVPs and other helpful folks
> who are willing to help you out with any situation you might have - free
> tech support - can't beat that.
>
> So what were you trying to do .. that Merge didn't allow you to do?
>
> BTW, read David Sceppa's book for a good explanation of Merge - it isn't
> really that complicated to figure out.
>
> - Sahil Malik
> http://dotnetjunkies.com/weblog/sahilmalik
>
>
>
>
> "Rob R. Ainscough" <robains@pacbell.net> wrote in message
> news:ezMKoIa#EHA.2788@TK2MSFTNGP15.phx.gbl...
>> After reading this article I have a better understanding of the process,
> but
>> getting to this understand was WAY to involved for the task at hand. It
> is
>> like the implementation of .Merge was an after thought rather than a
>> dream
>> method.
>>
>> http://www.knowdotnet.com/articles/datasetmerge.html
>>
>> However, I am disappointed that Microsoft have NOT done a better job in
>> documentation of how to use Merge correctly with concrete real world
>> samples -- the samples I've seen are a joke and have about ZERO real
>> world
>> application.
>>
>> But more importantly, the fact that so many developers are having a hard
>> time understanding the implementation (not the concept behind what a
>> Merge
>> should do or what needs to be accomplished by a merge) of how
> DataSet.Merge
>> works, that in itself should have the folks at Redmond going -- oops, we
>> goofed. Merge is supposed to be a developer tool, not some bizarre
>> implementation with all kinds of special conditions (some of which are
>> extremely important to the success of the final results) that requires
>> excessive R&D to figure it out.
>>
>> Sorry, I realize this is somewhat of a rant, but don't blame the
>> developer
>> community for a poorly documented and even worse implementation of
>> Merge.
>>
>> Rob.
>>
>>
>
>



Relevant Pages

  • Re: 17 Minutes With Bill Gates
    ... That is true for you, for me, for Bill Gates, and for the President of the ... If you are a developer, ... It is not possible to be universally popular. ... There are many ways Microsoft can make a very ...
    (microsoft.public.dotnet.general)
  • Re: 17 Minutes With Bill Gates
    ... That is true for you, for me, for Bill Gates, and for the ... If you are a developer, ... popular is an outgrowth of this. ... There are many ways Microsoft ...
    (microsoft.public.dotnet.general)
  • Re: 17 Minutes With Bill Gates
    ... lives in a eutopia that is not reality and thus his persception is based on ... Seeing as I am a developer in the real world, ... Microsoft applications/tools are engineered for what turns out to be about ... "His vision of reality" therefore is ambiguous at best. ...
    (microsoft.public.dotnet.general)
  • Re: 17 Minutes With Bill Gates
    ... I'm assuming you're a developer, someone who employs logic on a daily basis. ... vision of reality" therefore is ambiguous at best. ... Microsoft like all large organizations through out history have become ...
    (microsoft.public.dotnet.general)
  • Re: Senior Developer looking for your asst in employmt issue (not job seeking!)
    ... In light of your boss's instructions to you to use "a Microsoft ... your boss wanted to get rid of Access entirely, ... that you are not an incompetent developer. ... >front end linked to a SQL Server database. ...
    (microsoft.public.dotnet.framework.aspnet)