Posted on: 11/22/2011 4:02:30 PM | Views : 313

Hey all, first time poster so be gentle! So here's the scenario, I have a simple shopping cart website, I have a cookie with the orderID in it, and I'm trying to update a product in a cart. I am able to initially add a product to the cart but when i go back to update the quantity of a product later I get the error "Update requires a valid UpdateCommand when passed DataRow collection with modified rows." I have generated update insert and delete commands set.below is my code for adding and updating a product to the cart.
Imports System.Data.SqlClient Imports System.Data Partial Class addCart Inherits System.Web.UI.Page Protected Sub Page_Load1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim ProductID As Integer = 0 Integer.TryParse(Request.QueryString("productID"), ProductID) Dim Quantity As Integer = 0 Integer.TryParse(Request.QueryString("Quantity"), Q ...

Go to the complete details ...