J
Jared
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
(e-mail address removed)
987654321
555-1212
for a combined value of:
123456789
A good display name
Jared
AGoodLastName
Q
Jared
(e-mail address removed)
987654321
555-1212
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
(e-mail address removed)
987654321
555-1212
for a combined value of:
123456789
A good display name
Jared
AGoodLastName
Q
Jared
(e-mail address removed)
987654321
555-1212