Hi everyone. I have a page that paging through a recordset - works w/o issue. The problem is if I try to page fwd, I get an error on a certain line. The error is:
Error Type:
(0x80020009)
Exception occurred.
This is the line it occurs on:
Response.Write "<td class=smShadeMed>" & formatdatetime(objRS("dSubmit"),2) & "</td>"
If I comment out the line, it works with no issue. If I remove the formatdatetime function, it does not work - so it isn't that. Also, this only occurs during paging i.e., if I don't page and dump the entire recordset out - no problems...
This is what the code around it looks like:
Code:
For intRec=1 To ObjRS.PageSize
If Not ObjRS.EOF Then
if iLineNum mod 2 = 0 then
Response.Write "<tr>"
Response.Write "<td class=smShadeMed>" & objRS("dSubmit") & "</td>"
Response.Write "<td class=smShadeMed>" & ObjRS("cAccount") & "</td>"
Response.Write "<td class=smShadeMed>" & ObjRS("cMobile") & "</td>"
Response.Write "<td class=smShadeMed>" & cPricePlan & "</td>"
Response.Write "<td class=smShadeMed>" & cPromoCode & "</td>"
Response.Write "<td class=smShadeMed>" & cPricePlan & "</td>"
Response.Write "<td class=smShadeMed>" & cDiscountCode & "</td>"
Response.Write "<td class=smShadeMed>" & cFeatureCode & "</td>"
Response.Write "<td class=smShadeMed>" & objRS("cMarket") & "</td>"
Response.Write "<td class=smShadeMed>" & objRS("cChannel") & "</td>"
Response.Write "<td class=smShadeMed>" & objRS("iReason") & "</td>"
Response.Write "<td class=smShadeMed>" & objRS("cApprName") & "</td>"
Response.Write "<tr>"
else
Response.Write "<td class=smShadeLite>" & objRS("dSubmit") &"</td>"
Response.Write "<td class=smShadeLite>" & ObjRS("cAccount") & "</td>"
Response.Write "<td class=smShadeLite>" & ObjRS("cMobile") & "</td>"
Response.Write "<td class=smShadeLite>" & cPricePlan & "</td>"
Response.Write "<td class=smShadeLite>" & cPromoCode & "</td>"
Response.Write "<td class=smShadeLite>" & cPricePlan & "</td>"
Response.Write "<td class=smShadeLite>" & cDiscountCode & "</td>"
Response.Write "<td class=smShadeLite>" & cFeatureCode & "</td>"
Response.Write "<td class=smShadeLite>" & objRS("cMarket") & "</td>"
Response.Write "<td class=smShadeLite>" & objRS("cChannel") & "</td>"
Response.Write "<td class=smShadeLite>" & objRS("iReason") & "</td>"
Response.Write "<td class=smShadeLite>" & objRS("cApprName") & "</td>"
End If
ObjRS.MoveNext
iLineNum = iLineNum + 1
End If
Next
Response.Write "</tbody></table><p>"