Dataset merge

SLG31

Member
Joined
Aug 18, 2007
Messages
5
Programming Experience
1-3
Could anyone help with this question

dsOne is a dataset containing 2 rows and 2 columns the columns are personid and personname, primary key of dsone is personid

dsTwo is another dataset containing 1 row and 3 columns which are personid, personname and persontype

One of the rows in dsone has same value in personid column as row in dstwo, no other rows have matching personid values, merge is done with this code

dsone.merge(dstwo, true, missingschemaaction.add)

I've got to state how many rows dsone and dstwo will have after the merge and whether or not dsone will add the persontype column

I'm sure dsone will add the persontype column with the code missingschemaaction.add but I'm not sure how many rows dsone and dstwo will contain after the merge, I think true means the information is preserved
after the merge but still not sure

Any help would be appreciated, I've looked long and hard on the web but can't see any suitable examples

Thanks in advance
 
I believe your dsOne will still have the same 2 rows, but with an extra column "persontype" whereas dsTwo will have no changes. That's because you are targeting dsOne in the merge code.
 
Cjard

Why bother making a stupid comment like that, forums are supposed to be for helping people obviously you don't see it like that
 
Eahah. Heh. Right on! Yeah, actually my other 4500-odd posts were also me not understanding what a forum is for and being similarly unhelpful.
Realised I was right, and that it took 20 minutes to write the post, whereas it would have taken you 5 to write one line of code and press Play to test it? No need to be nasty about it. Kiss kiss!

:rolleyes:
 
At last sorted it, I was just getting a bit frustrated at the time I did my last post, new to all this programming lark so trying to learn as quickly as possible, cheers
 

Latest posts

Back
Top