Microsoft VBScript runtime error '800a01b6' Object doesn't support

Discussion in 'ASP General' started by avi, Nov 22, 2009.

  1. avi

    avi Guest

    THisis my error:


    Microsoft VBScript runtime error '800a01b6'

    Object doesn't support this property or method: 'Session.Add'

    /OnlineBookStore/AddItemProcess.asp, line 33



    Code i Used:

    <%
    Dim StrTechName, StrBookName, StrISBN, StrPrice, IntQuantity,
    IntCounter, IntCount, IntShowCounter, IntItemID, BlnDuplicate,
    IntTotalItems, DblTotalPrice, DblFinalPrice

    StrTechName = Trim(Request.Form("TechName"))
    StrBookName = Trim(Request.Form("BookName"))
    StrISBN = Trim(Request.Form("ISBN"))
    StrPrice = Trim(Request.Form("Price"))
    IntQuantity = Trim(Request.Form("TxtQuantity"))

    IF Session("LoginBuyer") = "" OR Session("LoginUser") = "" Then
    Response.Redirect("Default.asp")
    END IF

    BlnDuplicate = False

    IntCount = CInt(Session("TotalItems"))

    IF IntCount > 0 Then
    For IntCounter = 1 to IntCount
    IF Session("MyItems")("ISBN" & IntCounter) = StrISBN And Session
    ("MyItems")("Purchase" & IntCounter) = "yes" Then
    BlnDuplicate = True
    Exit For
    END IF
    Next
    END IF

    IF BlnDuplicate = True Then
    IntQuantity = IntQuantity + CInt(Session("MyItems")("Quantity" &
    IntCounter))
    Session("MyItems")("Quantity" & IntCounter) = IntQuantity
    ELSE
    IntItemID = CInt(Session("TotalItems"))
    IntItemID = IntItemID + 1
    Session("MyItems").Add "BookName" & IntItemID, StrBookName
    Session("MyItems").Add "ISBN" & IntItemID, StrISBN
    Session("MyItems").Add "Price" & IntItemID, StrPrice
    Session("MyItems").Add "Quantity" & IntItemID, IntQuantity
    Session("MyItems").Add "Purchase" & IntItemID, "yes"
    Session("TotalItems") = Session("TotalItems") + 1
    END IF
    %>

    <table border="0">
    <tr>
    <td><h3><font face="verdana, arial" color="darkblue">Item Added In
    Your Cart!</font></h3></td>
    </tr>
    </table>
    <hr color="black" noshade>
    <table border="0">
    <tr>
    <td class="SimpleText">You are in <b><%= StrTechName %></b>
    category.</td>
    </tr>
    </table>
    <table border="1" bordercolor="lightgrey" style="border-
    collapse:collapse">
    <tr>
    <td class="SimpleText"><b>Book Name</b></td>
    <td class="SimpleText"><b>ISBN</b></td>
    <td class="SimpleText"><b>Quantity</b></td>
    <td class="SimpleText"><b>Price</b></td>
    <td class="SimpleText"><b>Total Price</b></td>
    <td class="SimpleText"><b>Option</b></td>
    </tr>
    <%
    IntCount = CInt(Session("TotalItems"))
    For IntShowCounter = 1 to IntCount
    IF Session("MyItems")("Purchase" & IntShowCounter) = "yes" Then
    IntTotalItems = IntTotalItems + 1
    DblTotalPrice = CDbl(Session("MyItems")("Price" & IntShowCounter) *
    CInt(Session("MyItems")("Quantity" & IntShowCounter)))
    DblFinalPrice = DblFinalPrice + CDbl(DblTotalPrice)
    %>
    <tr>
    <td class="SimpleText"><%= Session("MyItems")("BookName" &
    IntShowCounter) %></td>
    <td class="SimpleText"><%= Session("MyItems")("ISBN" &
    IntShowCounter) %></td>
    <td class="SimpleText"><%= Session("MyItems")("Quantity" &
    IntShowCounter) %></td>
    <td class="SimpleText"><%= Session("MyItems")("Price" &
    IntShowCounter) %></td>
    <td class="SimpleText"><%= CDbl(DblTotalPrice) %></td>
    <td><a href="RemoveItem.asp?ISBN=<%= Session("MyItems")("ISBN" &
    IntShowCounter) %>" class="NormalLink">Remove Item</a></td>
    </tr>
    <%
    END IF
    Next
    %>
    </table>
    <hr color="black" noshade>
    <table border="1" bordercolor="lightgrey" style="border-
    collapse:collapse">
    <tr>
    <td class="SimpleText">Total items in your cart: <b><%=
    IntTotalItems %></b></td>
    </tr>
    <tr>
    <td class="SimpleText">Total cost of all items: <b><%= CDbl
    (DblFinalPrice) %></b></td>
    </tr>
    <%
    IF IntTotalItems > 0 Then
    %>
    <tr>
    <td><a href="SubmitOrder.asp" class="NormalLink">Submit My Order</
    a></td>
    </tr>
    <%
    END IF
    %>
    </table>
    avi, Nov 22, 2009
    #1
    1. Advertising

  2. avi

    Evertjan. Guest

    Re: Microsoft VBScript runtime error '800a01b6' Object doesn't support this property or method: 'Session.Add' /OnlineBookStore/AddItemProcess.asp, line 33

    avi wrote on 22 nov 2009 in microsoft.public.inetserver.asp.general:

    > Microsoft VBScript runtime error '800a01b6'
    >
    > Object doesn't support this property or method: 'Session.Add'


    Never heard of 'Session.Add' in classic asp.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Nov 22, 2009
    #2
    1. Advertising

  3. avi

    Bob Barrows Guest

    Re: Microsoft VBScript runtime error '800a01b6' Object doesn't support this property or method: 'Session.Add' /OnlineBookStore/AddItemProcess.asp, line 33

    avi wrote:
    > THisis my error:
    >
    >
    > Microsoft VBScript runtime error '800a01b6'
    >
    > Object doesn't support this property or method: 'Session.Add'
    >
    > /OnlineBookStore/AddItemProcess.asp, line 33
    >
    >
    >
    > Code i Used:


    Well, this can't be the code you're using because nowhere can be found the
    string "Session.Add".
    It appears from this:

    Session("MyItems").Add "BookName" & IntItemID, StrBookName

    that you are storing some sort of object that has a method called "Add" in
    Session. Hopefully this is not a Dictionary object. To see why, read this:
    http://www.aspfaq.com/2053



    --
    Microsoft MVP - ASP/ASP.NET - 2004-2007
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows, Nov 22, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PaulieS
    Replies:
    1
    Views:
    3,251
    Kevin Spencer
    Nov 28, 2005
  2. Replies:
    0
    Views:
    918
  3. Rahul Bakshi

    Microsoft VBScript runtime error '800a01c9'

    Rahul Bakshi, Sep 28, 2003, in forum: ASP General
    Replies:
    3
    Views:
    142
    Ray at
    Sep 28, 2003
  4. Michael

    800a01b6 create mailbox asp

    Michael, Jul 18, 2006, in forum: ASP General
    Replies:
    2
    Views:
    266
    Michael
    Jul 18, 2006
  5. GTN170777
    Replies:
    27
    Views:
    3,006
    Bob Barrows
    Jul 16, 2009
Loading...

Share This Page