<%
	sub executeUpdate(db,query)
		dim con
		err.clear
		on error resume next
		set con=server.createObject("adodb.connection")
		con.open db

		con.execute query

		con.close
		set con=nothing
		response.write err.description
    end sub

	count=cint(request("pcount"))
	for i=1 to count
		idp=request("pid")(i)
		executeUpdate Application("Product"),"update basket set count1=" & request("count" & idp) & " where ids='" & Session.SessionID & "' and idp=" & idp
    next

	response.redirect("viewbasket.asp")
%>