Hello,
I am trying to insert the following data into an Access database. The data is sent to the next page like this:
default_basket.asp?basketContentID=2&basketContentID=5&action=basket_confirm&catID=1&prodID=3&prodType=k&prodPrice=10&sessionID=603709016
I'm using the following script in the receiving page. It writes the information to screen ok when debugging, but when I try to execute sqlString it gives the following error message: Too few parameters. Expected 3.
Script:
Dim sqlString
For i = 1 To Request.QueryString("basketContentID").Count
sqlString = "INSERT INTO tbl_basket_contents ( basket_prodID, basket_contentID, basket_sessionID ) VALUES ( "
' Insert the values
sqlString = sqlString & """" & Request.QueryString("prodID") & """, "
sqlString = sqlString & """" & Request.QueryString("basketContentID")(i) & """, "
sqlString = sqlString & """" & Request.QueryString("sessionID") & """"
' Close the VALUES (...) bit
sqlString = sqlString & " )"
'Debug Option
'Response.Write sqlString & "</br>"
'Execute the query
Con.Execute sqlString
Next
I am trying to insert the following data into an Access database. The data is sent to the next page like this:
default_basket.asp?basketContentID=2&basketContentID=5&action=basket_confirm&catID=1&prodID=3&prodType=k&prodPrice=10&sessionID=603709016
I'm using the following script in the receiving page. It writes the information to screen ok when debugging, but when I try to execute sqlString it gives the following error message: Too few parameters. Expected 3.
Script:
Dim sqlString
For i = 1 To Request.QueryString("basketContentID").Count
sqlString = "INSERT INTO tbl_basket_contents ( basket_prodID, basket_contentID, basket_sessionID ) VALUES ( "
' Insert the values
sqlString = sqlString & """" & Request.QueryString("prodID") & """, "
sqlString = sqlString & """" & Request.QueryString("basketContentID")(i) & """, "
sqlString = sqlString & """" & Request.QueryString("sessionID") & """"
' Close the VALUES (...) bit
sqlString = sqlString & " )"
'Debug Option
'Response.Write sqlString & "</br>"
'Execute the query
Con.Execute sqlString
Next