I have a problem in my shopping basket. If i try to put a merchant in the basket and the merchant already is there, i get a error msg... but that isn't how i want it... i want it to increas the Quantity instead. Can u help me? The code i have now is:
<%
Dim oCmd
Dim BasketID, MerchantID, Quantity
Dim strSQL
BasketID = Request("BasketID"
MerchantID = Request("MerchantID"
Quantity = Request.Form("Quantity"
Set oCmd = Server.CreateObject("ADODB.Command"
With oCmd
.ActiveConnection = "DSN=SYCENT;"
strSQL = "INSERT INTO BasketContent(BasketID, MerchantID, Quantity) VALUES(" & BasketID & ", " & MerchantID & ", " & Quantity & ""
.CommandText = strSQL
.Execute
Set .ActiveConnection = Nothing
End With
Set oCmd = Nothing
Response.Redirect "ShowArt.asp?ID=" & Request("MerchantID"
%>
can anybody help me to increase the Quantity if the BasketID already contains a MerchantID? thanx in advance...
<%
Dim oCmd
Dim BasketID, MerchantID, Quantity
Dim strSQL
BasketID = Request("BasketID"
MerchantID = Request("MerchantID"
Quantity = Request.Form("Quantity"
Set oCmd = Server.CreateObject("ADODB.Command"
With oCmd
.ActiveConnection = "DSN=SYCENT;"
strSQL = "INSERT INTO BasketContent(BasketID, MerchantID, Quantity) VALUES(" & BasketID & ", " & MerchantID & ", " & Quantity & ""
.CommandText = strSQL
.Execute
Set .ActiveConnection = Nothing
End With
Set oCmd = Nothing
Response.Redirect "ShowArt.asp?ID=" & Request("MerchantID"
%>
can anybody help me to increase the Quantity if the BasketID already contains a MerchantID? thanx in advance...