How to solve Microsoft VBScript runtime (0x800A000D)Type mismatch error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sharbha
    New Member
    • Mar 2011
    • 2

    How to solve Microsoft VBScript runtime (0x800A000D)Type mismatch error

    I am experiencing a VBScript runtime error.
    The error message is: "(0x800A000D)Typ e mismatch error"

    Here is my code:
    Code:
    <% 
       dim temp
       temp=session("items")
       session("count")=session("count")+1
       redim  preserve items(session("count"))
      
      response.write items(session("count"))
        for i=0 to session("count")-1
          items(i)=temp(i)
         next
          
        items(session("count"))=request.form("impo")
        session("items")=items
       
    cstring="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="&Server.Mappath("../database/base.mdb")
    set conn = Server.CreateObject("ADODB.connection")
    set rs = Server.CreateObject("ADODB.recordset")
    conn.open cstring
    
    %>
    
    <html>
       <body bgcolor=#E1E1FF >
    <table border=0 width=100%>
       <tr><td align=center><font color=#FF0000><b>PRISCRIPTION LIST</b></font>
       </table>
       <center>
       <table border=0 width='60%'> 
       <tr><td width='30%' align=center><font color=darkblue><B>MEDICINE NAME</B></FONT></td>
       <td width='30%' align=center><font color=darkblue><B>PRICE Rs</font></td>
    
    <%
      for i=0 to session("count")
       sql= "select * from stores where mid ='"& items(i) &"'"
       rs.open sql,conn,1,3 
      if not rs.eof then
           response.write "<tr><td width='30%' align=center>"
          response.write rs("mname")
          response.write "</td><td width='30%' align=center>"&rs("price")&"</td></tr>"
        end if
        rs.close
        next 
      response.write "</table></center>"
     %>
     
    <br>
    <div align="center">
      <center>
    <table border=0 width='680' height="1">
    <tr><td align="right" height=1 width="345" valign="baseline">
    <form action=billing.asp method=post target=_top>
    <input type=submit value="Accept"></form>
    </td>
      <td align="center" height=1 width="93" valign="baseline">
    <form action=maintain.asp method=post>
    <input type=hidden value="cancel" name="flg">
    <input type=submit value="Cancel"></form></td>
      <td align="center" height=1 width="239" valign="baseline">
      </td>
    </tr>
    </table></center>
    </div>
       <table border="0" width="100%">
         <tr>
           <td width="100%">
           <p align="center"><font color="#FF0000"><b>HIT CANCEL TO DELETE YOUR LIST</b></font></td>
         </tr>
       </table>

    Please help me to resolve this problem.

    Thank you.
    Last edited by Frinavale; Mar 9 '11, 04:42 PM. Reason: Added code tags. Added a description of the problem from the thread title to the thread itself. Moved the question to the ASP Classic forum since it is not a ASP.NET question. Converted "leet/tex
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You have to tell us which line the error is on. The only thing I can tell you right now is that at some point, a function is expecting one variable type but you're giving it the wrong type.

    Comment

    Working...