By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 884 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

merging Datasets

P: 15
I am trying to merge two datasets, one that comes from a guest and then one that comes from a login.

For example I have a guest that adds a Dell Computer to his shopping cart. The Guest decides to log in, the log in has a Gateway Computer in the shopping cart. I am trying to merge the two datasets so that the person now has the Dell Computer and the Gateway computer in his shopping cart dataset.

What it is doing right now is overwriting the Gateway Computer with the Dell Computer, instead of taking both the Dell and Gateway. Also if I switch the places of the datasets it will just not take the Guest Shopping Cart dataset at all.

Expand|Select|Wrap|Line Numbers
  1.  Dim UserCart As ShoppingCart = Session("UserCart")
  2.                 Dim GuestCart As ShoppingCart = Session("Cart")
  3.  
  4. GuestCart.CartDataSet.Merge(UserCart.CartDataSet, True, MissingSchemaAction.Add)
  5.  
Apr 16 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.