473,320 Members | 2,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Microsoft VBScript runtime error '800a01b6'

Microsoft VBScript runtime error '800a01b6'

Object required for 'Session(...)'


/OnlineBookStore/AddItemProcess.asp, line 33

I have underlined the error line

Code i Used:
Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim StrTechName, StrBookName, StrISBN, StrPrice, IntQuantity,
  3. IntCounter, IntCount, IntShowCounter, IntItemID, BlnDuplicate,
  4. IntTotalItems, DblTotalPrice, DblFinalPrice
  5.  
  6. StrTechName = Trim(Request.Form("TechName"))
  7. StrBookName = Trim(Request.Form("BookName"))
  8. StrISBN = Trim(Request.Form("ISBN"))
  9. StrPrice = Trim(Request.Form("Price"))
  10. IntQuantity = Trim(Request.Form("TxtQuantity"))
  11.  
  12. IF Session("LoginBuyer") = "" OR Session("LoginUser") = "" Then
  13. Response.Redirect("Default.asp")
  14. END IF
  15.  
  16. BlnDuplicate = False
  17.  
  18. IntCount = CInt(Session("TotalItems"))
  19.  
  20. IF IntCount > 0 Then
  21.         For IntCounter = 1 to IntCount
  22.         IF Session("MyItems")("ISBN" & IntCounter) = StrISBN And Session
  23. ("MyItems")("Purchase" & IntCounter) = "yes" Then
  24.         BlnDuplicate = True
  25.         Exit For
  26.         END IF
  27.         Next
  28. END IF
  29.  
  30. IF BlnDuplicate = True Then
  31. IntQuantity = IntQuantity + CInt(Session("MyItems")("Quantity" &
  32. IntCounter))
  33. Session("MyItems")("Quantity" & IntCounter) = IntQuantity
  34. ELSE
  35. IntItemID = CInt(Session("TotalItems"))
  36. IntItemID = IntItemID + 1
  37. Session("MyItems").Add "BookName" & IntItemID, StrBookName
  38. Session("MyItems").Add "ISBN" & IntItemID, StrISBN
  39. Session("MyItems").Add "Price" & IntItemID, StrPrice
  40. Session("MyItems").Add "Quantity" & IntItemID, IntQuantity
  41. Session("MyItems").Add "Purchase" & IntItemID, "yes"
  42. Session("TotalItems") = Session("TotalItems") + 1
  43. END IF
  44. %>
  45.  
  46. <table border="0">
  47.         <tr>
  48.                 <td><h3><font face="verdana, arial" color="darkblue">Item Added In
  49. Your Cart!</font></h3></td>
  50.         </tr>
  51. </table>
  52. <hr color="black" noshade>
  53. <table border="0">
  54.         <tr>
  55.                 <td class="SimpleText">You are in <b><%= StrTechName %></b>
  56. category.</td>
  57.         </tr>
  58. </table>
  59. <table border="1" bordercolor="lightgrey" style="border-
  60. collapse:collapse">
  61.         <tr>
  62.                 <td class="SimpleText"><b>Book Name</b></td>
  63.                 <td class="SimpleText"><b>ISBN</b></td>
  64.                 <td class="SimpleText"><b>Quantity</b></td>
  65.                 <td class="SimpleText"><b>Price</b></td>
  66.                 <td class="SimpleText"><b>Total Price</b></td>
  67.                 <td class="SimpleText"><b>Option</b></td>
  68.         </tr>
  69.         <%
  70.                 IntCount = CInt(Session("TotalItems"))
  71.                 For IntShowCounter = 1 to IntCount
  72.                 IF Session("MyItems")("Purchase" & IntShowCounter) = "yes" Then
  73.                 IntTotalItems = IntTotalItems + 1
  74.                 DblTotalPrice = CDbl(Session("MyItems")("Price" & IntShowCounter) *
  75. CInt(Session("MyItems")("Quantity" & IntShowCounter)))
  76.                 DblFinalPrice = DblFinalPrice + CDbl(DblTotalPrice)
  77.         %>
  78.         <tr>
  79.                 <td class="SimpleText"><%= Session("MyItems")("BookName" &
  80. IntShowCounter) %></td>
  81.                 <td class="SimpleText"><%= Session("MyItems")("ISBN" &
  82. IntShowCounter) %></td>
  83.                 <td class="SimpleText"><%= Session("MyItems")("Quantity" &
  84. IntShowCounter) %></td>
  85.                 <td class="SimpleText"><%= Session("MyItems")("Price" &
  86. IntShowCounter) %></td>
  87.                 <td class="SimpleText"><%= CDbl(DblTotalPrice) %></td>
  88.                 <td><a href="RemoveItem.asp?ISBN=<%= Session("MyItems")("ISBN" &
  89. IntShowCounter) %>" class="NormalLink">Remove Item</a></td>
  90.         </tr>
  91.         <%
  92.                 END IF
  93.                 Next
  94.         %>
  95. </table>
  96. <hr color="black" noshade>
  97. <table border="1" bordercolor="lightgrey" style="border-
  98. collapse:collapse">
  99.         <tr>
  100.                 <td class="SimpleText">Total items in your cart: <b><%=
  101. IntTotalItems %></b></td>
  102.         </tr>
  103.         <tr>
  104.                 <td class="SimpleText">Total cost of all items: <b><%= CDbl
  105. (DblFinalPrice) %></b></td>
  106.         </tr>
  107.         <%
  108.                 IF IntTotalItems > 0 Then
  109.         %>
  110.         <tr>
  111.                 <td><a href="SubmitOrder.asp" class="NormalLink">Submit My Order</
  112. a></td>
  113.         </tr>
  114.         <%
  115.                 END IF
  116.         %>
  117. </table> 
  118.  
Please guys get me the solution for this...
Its urgent...
Mar 13 '10 #1
6 5557
jhardman
3,406 Expert 2GB
I don't see anything underlined. Where is the error?

Jared
Mar 25 '10 #2
jhardman
3,406 Expert 2GB
Pls See the line 37

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


Sir, Now it show the following error


HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

Technical Information (for support personnel)
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'Session(...)'
/tilak/AddItemProcess.asp, line 37

Browser Type:
Opera/9.63 (Windows NT 5.1; U; en) Presto/2.1.1

Page:
POST 90 bytes to /tilak/AddItem.asp

POST Data:
TechName=Nokia&BookName=NOKIA7420&Price=8000&Mobil eID=4&TxtQuantity=2&submit=Add+This+Item


Pls sir, get me the solution for this.....
You accidentally sent your reply as a private message instead of putting it in the thread. I am including it here.

Jared
Mar 28 '10 #3
jhardman
3,406 Expert 2GB
right before that line, add this to test what you have:
Expand|Select|Wrap|Line Numbers
  1. for each x in session("myItems")
  2.    response.write x.name & ": " & x.value & "<br>" % vbNewLine
  3. next
Jared
Mar 28 '10 #4
Nicodemas
164 Expert 100+
The session variable in ASP is not a collection. The .Add() command is probably the problem.

At the same time, though, it depends on the vartype of the session variable. Can you tell me that?
Mar 30 '10 #5
The data type of session variable is varient type....
Apr 2 '10 #6
Nicodemas
164 Expert 100+
Variant indicates that the session variable is an array. The Add() will not work, unfortunately.

You have to determine the ubound, and if your new addition would exceed the ubound, you have to redim the array (preserving the contents using keyword 'preserve') to the new ubound (old ubound + 1), then assign the new value to the highest index.
Apr 2 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: | last post by:
I am accessing the same error-containing ASP page on an ISP server using w2k IE6 but with different effect. On the first computer I get several line of HTML outputed by ASP, shown correctly by...
3
by: Mike Kanski | last post by:
I get this error Microsoft VBScript runtime error '800a01fb' When i call LoadPicture method, or when i pretty much do any operation with PictureBox like setting width and height. It happened...
10
by: Seeker | last post by:
Hi! I have to do some developing and I'm trying to configure my server to mimic the operation of our production server. The issue I'm having is that I'm trying to use CDONTS to send an email...
1
by: PaulieS | last post by:
Hi all. Am migrating a customer from IIS5 on W2K server to IIS6 on W2K3. Zipped all the websites and unzipped them to the identical locations on new server. Used IISMT to migrate metabase. ...
3
by: Snow | last post by:
Hello: I have Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: '' The error happened at this line: if session("systemIdCount" & arrSystems(iLoop)) 0 The code like this:
2
by: anidmarty | last post by:
Hey I'm a Sysadmin and my users are getting this error on my production box. It works fine on the dev box. There is a script that is run that generates this error. Production is clustered...
0
by: =?Utf-8?B?TWF0dCBDYWxob29u?= | last post by:
HI there, I am getting an error on my page which calls up a web service. Microsoft VBScript runtime error '800a13ba' Unknown runtime error: 'SearchQueryXML' /SearchResults.asp, line 142
1
by: monika | last post by:
Hello: I have Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: '' /OnlineLIB/BNosearch1.asp, line 32 The error happened at this line:bookno = chr(bookno) The code like...
4
by: Genken | last post by:
Hi can anybody help me i get this error when running this code. Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' And then a line number indicating where the error is, i...
0
by: .nLL | last post by:
Erorr is --------------------- Microsoft VBScript runtime error '800a0046' Permission denied /a.asp, line 3 -----------------------
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.