![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm using DataTable.Merge() to merge values from a source DT into a destination DT which are in seperate Datasets. The source DT has columns A,B,C and the destination DT has columns A,B,D. column A is primary key for both of them. So, basically, my target is to copy all the values from column B in the source DT to column B in the destination DT. So far so good (Merge with MissingSchemaAction.Ignore does the job). However, The source DT has 1000 rows and the destination DT has 50 rows. The Merge action copy all the 1000 rows into the destination DT, where I'm only interested in updating the existing 50 rows in the destination DT. (Just update, no Insert). From what I've read, if merge doesn't find a corresponding PK it adds the new rows. Is there any way to go around this with merge? any other way, without using merge? (I tried to save looping over all the rows in one DT and locating them in the other one) Thanks in advance Eran |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |