RE: Dataset.merge method

From: mklapp (mklapp_at_discussions.microsoft.com)
Date: 10/05/04


Date: Tue, 5 Oct 2004 07:27:01 -0700

The behavior of each row in the ds to be merged (the one between the parens,
not the 'owner' of the method) depends on the Row State. Unchanged, Modified
and Deleted are matched on primary keys. Added rows are simply added to the
table.

"Jared" wrote:

> Hello all,
> I am trying to merge a datarow (dataset, datatable, etc.) with values
> from my database with another one that is filled with values from my active
> directory database and merge the two together with the values from active
> directory taking precedence. I have never used the merge method before and I
> am having a bit of trouble.
>
> I have two dataset objects
> ds - dataset containing a single datatable object and a single row
> ADds - same as ds
>
> the schema is exactly the same as I have used ds.tables(0).clone to create
> ADds' datatable and used the newrow function of ADds to populate my data
> from AD.
>
> This is where I'm having problems. I am currently using
> ADds.Merge(ds,False), but the resulting dataset contains only the data from
> ADds, can someone please point me in the right direction. I would prefer not
> to loop through the datasets if at all possible, either way I would like to
> know how the merge method is used (documentation only show the
> missingschema.add variation). There is a primary key column set, and If
> memory serves correctly, when I use the clone method my key column should
> remain (which looks to be supported by the traces that I've run).
>
> TIA,
> Jared
>
> Original DS Values (Database)
> 123456789
> My messed up display name
> Jared
> MyLastName
> Q
> jared
> jared
> <null>
> <null>
>
> Merged DS Values (AD)
> 123456789
> A good display name
> Jared
> AGoodLastName
> <null>
> Jared
> jared@mydomain.com
> 987654321
> 555-1212
>
> for a combined value of:
>
> 123456789
> A good display name
> Jared
> AGoodLastName
> Q
> Jared
> jared@mydomain.com
> 987654321
> 555-1212
>
>
>



Relevant Pages

  • Re: Dataset.merge method
    ... it makes sense to have it based on the row state. ... > and Deleted are matched on primary keys. ... >> directory database and merge the two together with the values from active ... >> My messed up display name ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: Userform to add and update a table
    ... One of the most common scenarios in application development is to display ... the walkthrough illustrates many of the basic ... Access to a server with the Pubs SQL Server sample database. ... Creating the Windows Form. ...
    (microsoft.public.sqlserver.programming)
  • Re: Picture property for Access 2K forms
    ... and it works great...until you look at the database size involved. ... or by simply scaling down the image display in the ... > supported by those filters. ... To associate a graphic file with an OLE Server, ...
    (microsoft.public.access.devtoolkits)
  • Re: interview questions
    ... the most important thing is that they understand database DESIGN. ... There is no such thing as multiple primary keys in a ... Should an Autonumber field be used as a Primary Key? ... Normalization is a methodology or process for removing as much redundant ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Unknown Maiden Name [WAS how-to ruin a perfectly good FGS]
    ... through at the beginning of my database, ... or display your information in the fields you intended for them. ... the names in a manner you didn't intend and the meaning has become ... If my data is on the Internet and people don't understand it, ...
    (soc.genealogy.methods)