Help with Type Mismatch issue

Results 1 to 2 of 2

Thread: Help with Type Mismatch issue

  1. #1
    Join Date
    Dec 1969

    Default Help with Type Mismatch issue

    I am new to ASP, in fact I have been using it only since Wednesday 7/21/04. I have a Web form that has questions and answers in Spanish and I want to translate the responses to English before inserting them into a database table. <BR><BR>I cannot however, get the translating section of code to work. The code is as follows:<BR><BR> dim Q(21)<BR> dim i, temp<BR> Q(0) = request.form("Q1")<BR> Q(1) = request.form("Q2")<BR> Q(2) = request.form("Q3")<BR> Q(3) = request.form("Q4")<BR> Q(4) = request.form("Q5")<BR> Q(5) = request.form("Q6")<BR> Q(6) = request.form("Q7")<BR> Q(7) = request.form("Q8")<BR> Q(8) = request.form("Q9")<BR> Q(9) = request.form("Q10")<BR> Q(10) = request.form("Q11")<BR> Q(11) = request.form("Q12")<BR> Q(12) = request.form("Q13")<BR> Q(13) = request.form("Q14")<BR> Q(14) = request.form("Q15")<BR> Q(15) = request.form("Q16")<BR> Q(16) = request.form("Q17")<BR> Q(17) = request.form("Q18")<BR> Q(18) = request.form("Q19")<BR> Q(19) = request.form("Q20")<BR> Q(20) = request.form("Q21")<BR> Q(21) = request.form("Q22")<BR> <BR> For Each i in Q<BR> If Q(i) = "Muy de Acuerdo" Then “This is line 133”<BR> temp = "Strongly Agree"<BR> Else<BR> If item = "De Acuerdo" Then<BR> temp = "Agree"<BR> Else <BR> If item = "Yo Soy Neutral" Then<BR> temp = "I am neutral"<BR> Else <BR> If item = "En des-Acuerdo" Then<BR> temp = "Disagree"<BR> Else <BR> If item = "Muy Apuesto" Then<BR> temp = "Strongly Disagree"<BR> Else<BR> temp = "N/A"<BR> End If<BR> End If<BR> End IF<BR> End If<BR> End If<BR><BR> Q(i) = temp<BR> i = i + 1<BR> Next <BR><BR> Q1 = Q(0)<BR> Q2 = Q(1)<BR> Q3 = Q(2)<BR> Q4 = Q(3)<BR> Q5 = Q(4)<BR> Q6 = Q(5)<BR> Q7 = Q(6)<BR> Q8 = Q(7)<BR> Q9 = Q(8)<BR> Q10 = Q(9)<BR> Q11 = Q(10)<BR> Q12 = Q(11)<BR> Q13 = Q(12)<BR> Q14 = Q(13)<BR> Q15 = Q(14)<BR> Q16 = Q(15)<BR> Q17 = Q(16)<BR> Q18 = Q(17)<BR> Q19 = Q(18)<BR> Q20 = Q(19)<BR> Q21 = Q(20)<BR> Q22 = Q(21)<BR><BR><BR>The error I am getting is this:<BR>Microsoft VBScript runtime error &#039;800a000d&#039; <BR>Type mismatch: &#039;Muy de Acuerdo&#039; <BR>/cgi-bin/spanishform.asp, line 133 <BR><BR>Does anyone have any suggestions? I really need to get this working so that I can post my site. Thank you.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Help with Type Mismatch issue

    If you are using "For Each i in Q" then you have to say:<BR>If i = "Muy de Acuerdo" Then <BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts