troubled_iis_user
asked on
visual studio dataset multiple SQL Servers and Databases Merge
i have a dataset with 2 tableadapters in it. each table adapter pulls from a different database on a different SQL server. how can i combine the results from these two tableadapters. (they both "select * FROM" and have getdata() methods. can i call the results from one tableadapter in the other tableadapter somehow? can i create a datatable and merge these two tableadapters somehow? any suggestions? i want to do everything in the dataset designer or the dataset class definition file, not through a windows forms class since i do not want this to be dependent on the page it sits on. thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
BIDS
If so, yes... there is a DataSet.Merge() method that will merget the two together. Actually, it a tow part process... the Merge() just "decorate" the dataset with the "adds, deletes, and updates". After that, you just do a DataAdpter.Update to save the changes.
http://msdn.microsoft.com/en-us/library/aszytsd8.aspx