Dataset merging

I was helping out a fellow team member today when he ran into a problem trying to merge two datasets.

We were trying to take a dataset fill it with data from one database.

Create a second dataset with data from a table of the same name but from another database.

Merge those two datasets together and put the merged data back into the first database. The problem with the dataset.merge functionality was that the datasets still had a rowstate of unchanged, which caused the update to not do anything.

To get around this we set the  AcceptChangesDuringFill property of the second dataadapter to FALSE. This allowed the dataadapter to have it's contents as added, instead of unchanged. I am now just waiting for Jeff to get back from lunch to see if the update will function properly.

I got the answers to this problem from this post.

No Comments