The infamous DataSet.Merge command...

  • Thread starter Thread starter Rob R. Ainscough
  • Start date Start date
R

Rob R. Ainscough

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.
 
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
 
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/d...tml/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/d...ml/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.
 
Thank you, I'll get the book today.

Rob.

Sahil Malik said:
Oh man .. who'd have thought copy paste would fail me .. anyway .. here's
a
screenshot of the cover of the book.

- SM
 
Back
Top