ADODB.Field error '80020009'

Jack Bauer

New Member
Recently we have been getting this error:ADODB.Field error '80020009'Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record./PHET/mscripts/TestScoring.asp, line 52 This specific file is used for 10 other tests and those do not error out. I have checked the database and everything looks good. Here is the actual page that is throwing the error...\[code\]<%@LANGUAGE="VBSCRIPT"%><!--#include file="DoSecure.asp" --><!--#include virtual="/lib/dbConnModules.asp" --><%Dim rsAnswer__MMColParamrsAnswer__MMColParam = Session("ModuleID")Set rsAnswer = Server.CreateObject("ADODB.Recordset")rsStrAnswer = "SELECT * FROM TestAnswers WHERE TestName = '" & Request.Form("testName") & "' and ApplicationID = '" & Session("ApplicationID") & "' and moduleID = '" + Replace(rsAnswer__MMColParam, "'", "''") + "'"rsAnswer.open rsStrAnswer, dbConnModulesanswerArray = array(rsAnswer("AnswerQ1"), rsAnswer("AnswerQ2"), rsAnswer("AnswerQ3"), rsAnswer("AnswerQ4"), rsAnswer("AnswerQ5"), rsAnswer("AnswerQ6"), rsAnswer("AnswerQ7"), rsAnswer("AnswerQ8"), rsAnswer("AnswerQ9"), rsAnswer("AnswerQ10"), rsAnswer("AnswerQ11"), rsAnswer("AnswerQ12"), rsAnswer("AnswerQ13"), rsAnswer("AnswerQ14"), rsAnswer("AnswerQ15"), rsAnswer("AnswerQ16"), rsAnswer("AnswerQ17"), rsAnswer("AnswerQ18"), rsAnswer("AnswerQ19"), rsAnswer("AnswerQ20"))testArray = array(Request.Form("Q1"), Request.Form("Q2"), Request.Form("Q3"), Request.Form("Q4"), Request.Form("Q5"), Request.Form("Q6"), Request.Form("Q7"), Request.Form("Q8"), Request.Form("Q9"), Request.Form("Q10"), Request.Form("Q11"), Request.Form("Q12"), Request.Form("Q13"), Request.Form("Q14"), Request.Form("Q15"), Request.Form("Q16"), Request.Form("Q17"), Request.Form("Q18"), Request.Form("Q19"), Request.Form("Q20"))if not rsAnswer.EOF then myCorrect = 0 For i=0 To (rsAnswer("NumOfQs") - 1) 'Response.Write(i+1 & Request.Form("q" & i+1) & "<br />") If isNull(answerArray(i)) then answerArray(i) = "" End If If answerArray(i) = testArray(i) Then myCorrect = myCorrect + 1 End if Next 'Response.Write(myCorrect)end if 'Response.Write(myCorrect)%><%strTestRecord = "insert into TestRecords (ApplicationID, ModuleID, TestName, UserEmail, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q20, Debugger, numberCorrect) values ('" &_ Session("ApplicationID") & "', '"&_ Session("ModuleID") & "', '"&_ Replace(Request.Form("testName"), "'", "''") & "', '"&_ Session("UserEmailAddr") & "', '"&_ Replace(Request.Form("Q1"), "'", "''") & "', '" &_ Replace(Request.Form("Q2"), "'", "''") & "', '" &_ Replace(Request.Form("Q3"), "'", "''") & "', '" &_ Replace(Request.Form("Q4"), "'", "''") & "', '" &_ Replace(Request.Form("Q5"), "'", "''") & "', '" &_ Replace(Request.Form("Q6"), "'", "''") & "', '" &_ Replace(Request.Form("Q7"), "'", "''") & "', '" &_ Replace(Request.Form("Q8"), "'", "''") & "', '" &_ Replace(Request.Form("Q9"), "'", "''") & "', '" &_ Replace(Request.Form("Q10"), "'", "''") & "', '" &_ Replace(Request.Form("Q11"), "'", "''") & "', '" &_ Replace(Request.Form("Q12"), "'", "''") & "', '" &_ Replace(Request.Form("Q13"), "'", "''") & "', '" &_ Replace(Request.Form("Q14"), "'", "''") & "', '" &_ Replace(Request.Form("Q15"), "'", "''") & "', '" &_ Replace(Request.Form("Q16"), "'", "''") & "', '" &_ Replace(Request.Form("Q17"), "'", "''") & "', '" &_ Replace(Request.Form("Q18"), "'", "''") & "', '" &_ Replace(Request.Form("Q19"), "'", "''") & "', '" &_ Replace(Request.Form("Q20"), "'", "''") & "', '" &_ Request.Form("Debugger") & "', " & myCorrect & ")" Session("NumOfQs") = rsAnswer("NumOfQs")Session("NumToPass") = rsAnswer("NumToPass")Session("YourScore") = myCorrectif myCorrect > Session("NumToPass") then pf = "pass" else pf = "fail" end if ' PASS OR FAILstrTestRecordComplete = "insert into CheckRequirements (ApplicationID, UserEmail, ModuleID, RequirementName, PassOrFail, OperationalIPAddr) values ('" & Session("ApplicationID") & "', '" & Session("UserEmailAddr") & "', '" & Session("ModuleID") & "', '"& Request.Form("testName") & "', '" & pf & "', '" & Request.ServerVariables("REMOTE_ADDR") & "')"dbConnModules.Execute(strTestRecord)dbConnModules.Execute(strTestRecordComplete)if Request.Form("TestName") = "pretest" Then Response.Redirect("../" & Session("ModuleDir") & "/TestResults.asp?fr=pre&desturl="& Request.Form("desturl"))elseif Request.Form("TestName") = "posttest" Then Session("rsYourAnswers") = testArray Response.Redirect("../" & Session("ModuleDir") & "/TestResults.asp?fr=post&desturl="& Request.Form("desturl"))End If%><%rsAnswer.Close()Set rsAnswer = Nothing%><!--#include virtual="/lib/dbConnModulesClose.asp" -->\[/code\]Any ideas?Thanks,Jen :)
 
Back
Top