Error Type:
Provider (0x80020005)
Type mismatch.
/mmtec/mm32/HandleHughInputAQuestion2.asp, line 17.But I don't think it is this line
This is the script that process data sent by the form here is teh code for
HandleHughInputAQuestion2.asp
<html>
<head>
<TITLE>handlingInput</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Set MyConn=Server.CreateObject("ADODB.Connection")
Set Rs=Server.CreateObject("ADODB.RecordSet")
Set Rs2=Server.CreateObject("ADODB.RecordSet")
MyConn.Open("mm32")
Rs.Open "SELECT * From Question WHERE questionNo=1", MyConn, 1, 2
Rs2.Open "SELECT * From PossibleAnswer WHERE questionNo=1", MyConn, 1, 2
'Add a record to the Question Table
Rs.AddNew
Rs("LawNo")=Request.Querystring("LawNo")
Rs("ComponentNo")=Request.Querystring("ComponentNo ")
Rs("questionText")=Request.Form("Question")
Rs("questionExplanation")=Request.Form("Explanatio n")
Rs("questionAnecDote")=Request.Form("Anecdote")
Rs("questionFurtherThoughts")=Request.Form("Furthe rThoughts")
Rs.Update
'We need to know the questionNo that was produced by that Update
Response.write "<P>A new question has been added </p>"_
& "<p>LawNumber: " & Rs.Fields("LawNo") & "</p>"
Rs.Close
Rs.Open "SELECT TOP 1 * From Question ORDER By questionNo DESC", MyConn, 1, 2
'Add up to 4 records in the PossibleAnswer Table
If Not Request.Form("Answer1")= "" Then
Rs2.AddNew
Rs2("questionNo")=Rs("questionNo")
Rs2("AnswerNo")=1
Rs2("answerText")=Request.Form("Answer1")
If Cint(Request.Form("Ans"))=1 Then
Rs2("isThisCorrect")=True
End If
Rs2.Update
End If
If Not Request.Form("Answer2")="" Then
Rs2.AddNew
Rs2("questionNo")=Rs("questionNo")
Rs2("AnswerNo")=2
Rs2("answerText")=Request.Form("Answer2")
If Cint(Request.Form("Ans"))=2 Then
Rs2("isThisCorrect")=True
End If
Rs2.Update
End If
If Not Request.Form("Answer3")="" Then
Rs2.AddNew
Rs2("questionNo")=Rs("questionNo")
Rs2("AnswerNo")=3
Rs2("answerText")=Request.Form("Answer3")
If Cint(Request.Form("Ans"))=3 Then
Rs2("isThisCorrect")=True
End If
Rs2.Update
End If
If Not Request.Form("Answer4")="" Then
Rs2.AddNew
Rs2("questionNo")=Rs("questionNo")
Rs2("AnswerNo")=4
Rs2("answerText")=Request.Form("Answer4")
If Cint(Request.Form("Ans"))=4 Then
Rs2("isThisCorrect")=True
End If
Rs2.Update
End If
%>
</body>
</html>
andrew
|