Problemer med at skrive (insert) til tabel
jeg har en form hvori indkøbskurven og størrelse ligger (se link): http://www.capitolshop.dk/product.asp?IDproduct=13jeg har prøvet at taste dette ind for at skrive productID, brugerens sessionID samt Quantity (1 stk) og Størrelse til shoppingcart tabellen, men jeg får fejl - pls help.
<%
If Request.Form("SubmitForm") = "Add to Cart" Then
Dim productID 'as String
Dim Quantity 'as String
Dim sessionID 'as String
Dim Size 'as String
Dim boolInsert 'as boolean
boolInsert = true
productID = Request.Form("productID")
Quantity = 1
Size = Request.Form("Size")
sessionID = Session.SessionID
If len(productID) < 1 Then
boolInsert = False
End If
If boolInsert Then
sqlQuery = "up_InsertIntoCart " & productID & ", " & Quantity & ", " & Size & ", " sessionID
Set rs = Server.CreateObject("ADODB.Recordset")
Set rs = db.Conn.Execute(sqlQuery)
CREATE PROCEDURE up_InsertIntoCart
@productID INT,
@Quantity INT,
@Size INT,
@sessionID Varchar(100)
AS
Insert Into shoppingcart
(sessionID, productID, Quantity, Size)
Select
@sessionID
@productID
@Quantity
@Size
Select * From shoppingcart WHERE sessionID = @sessionID
GO
%>
sig til hvis jeg mangler at give nogen informationer.
min form hedder: Add to Cart
produktet vises gennem "specific_product" recordset på baggrund af productID
