ngaisteve1
Junior Member
 
Malaysia
241 Posts |
Posted - 03 November 2003 : 04:23:24
|
I received an error mesg saying
ADODB.Field (0x80020009) Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
This page is actually displaying a page where user can update multiple record. This means that example, 3 products will come out. There will be a textbox of every product. I name this textbox Quantity and when user has key in the quantity of these 3 product and click Add to list, the system will update all these 3 records. Something like we see in Shopping cart.
I think the error is somewhere around here:
<% sql = "SELECT * FROM product " sql = sql & "WHERE pcategory = '" & strCategory &"' " sql = sql & "AND ptype = '" & strType &"' ORDER BY pname" rs.CursorLocation = 3 rs.Open sql, conn %> <tr> <td colspan=2> <table border=1 cellspacing=0 cellpadding=2> <form action=product_del.asp method=post onSubmit="return ValidateForm(this,'list')"> <tr><td><input type="hidden" name="<%= (iCount & ".ID") %>" value="<%=rs("ProductID")%>"></td></tr> <tr><td><input type="hidden" name="Count" value="<%= iCount - 1 %>"></td></tr> <tr valign="middle" bgcolor="#666666" style="color:#FFFFFF"> <td nowrap>Product Name</td> <td nowrap>Category</td> <td nowrap>Type</td> <td nowrap>Price</td> <td nowrap>Quantity</td> <td> </td> </tr> <% dim iCount iCount = 0 DO WHILE ((RepeatCart_numRows <> 0) AND (NOT rs.eof)) RepeartCart_index = RepeatCart_index + 1 RepeatCart_numRows = RepeatCart_numRows - 1 response.Write "<tr valign=top><td><A onclick=" & Chr(34) & "NewWindow(this.href,'name','500','470','no');return false" & Chr(34) & " class=" & Chr(34) & "content" & Chr(34) & " HREF='product_view_form.asp?passProductID=" & rs("productID") & "'>" & rs("pname") & "</a></td>" response.write "<td nowrap>" & rs("PCategory") & " </td>" response.write "<td nowrap>" & rs("PType") & " </td>" response.write "<td nowrap>" & rs("PPrice") & " </td>" response.write "<td nowrap><input type=text name=" & iCount & ".Qty" & " value=" & rs("quantity") & "></td>" response.write "<td><input type='checkbox' id=" & rs("ProductID") & " name='list' value=" & rs("ProductID") & " onClick=" & Chr(34) & "setParentTR(event, 'background', '#E8E8E8', 'white')""></td></tr>" iCount = iCount + 1 rs.MoveNext LOOP %> |
|