Problems with the shopping card delete section:
ADODB.Recordset error '800a0cc1'
Unknown runtime error
/phr004/coursework1/addCart.asp, line 42
Solution:
Resolved by typing in card_id in the line below:
RS.Open sqlString
WHILE NOT RS.EOF
newQ = TRIM( Request( "pq" & RS( "cart_id" ) ) )
deleteProduct = TRIM( Request( "pd" & RS( "cart_id" ) ) )
IF newQ = "" OR newQ = "0" OR deleteProduct <> "" THEN
RS.Delete
ELSE
IF isNumeric( newQ ) THEN
RS( "cart_quantity" ) = newQ
END IF
Featured Page:
This error was generated when I was trying to show the Product Price on the Featured Page as it only shows Product Name and Brief Description.
Error:
Microsoft VBScript runtime error '800a0009'
Subscript out of range: '[number: 4]'
/phr004/coursework1/Featured.asp, line 52
Resolved the issue by finding the error in the code as shown below:
<%
FOR i = 0 TO topFeatured - 1 STEP skip
offset = RND * ( skip - 1 )
productID = featuredArray( 0, i + offset )
productPicture = featuredArray( 1, i + offset )
productName = featuredArray( 2, i + offset )
productBriefDesc = featuredArray( 3, i + offset )
productPrice = featuredArray( 4, i + offset )
%>
<% IF productPicture <> "?????" THEN %>
"
HSPACE=5 VSPACE=5 BORDER=0 align="center">
<% END IF %>
<%=productName%>
<%=productBriefDesc%>
£<%=productPrice%>
Edit tag: to
Edit tag:
Feed back error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e0c'
Command text was not set for the command object.
/phr004/coursework1/saveFeedback.asp, line 15
Solution:
sqlString = "INSERT INTO feedback ( feedback_email, feedback_comment ) " &_
"VALUES ('" & fixQuotes ( email ) & "','" & fixQuotes( comment ) & "')"
dsnCon.Execute sqlString
No comments:
Post a Comment