Non "Trivial" Dataset Operations

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Does anyone know of any good online examples of using
DataAdapter.Update when your dataset operations are not
the "trival" case where SELECT, INSERT, UPDATE and DELETE
are applied to all tables in a typed dataset?

Say for example your typed dataset has two tables "First"
and "Second". Your SELECT command should have SELECT
stored procedures for "First" and "Second" but your UPDATE
command stored procedure would only UPDATE "Second" and
the INSERT command would only INSERT into "First".

I find I have a lot of problems with parameters not
supplied, etc. when I try to do this kind of thing.
 
Ideally, you should follow the design for the DataAdapter and use a separate
DA for each table. This way no one (not even ADO.NET) is confused as to
which table needs to be updated or changed with the Update method. My book
has examples that go beyond the "trivial" case and I have a new article
published in VSJ (September/October) that discusses the DA in more depth.

hth

--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top