473,796 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error Displyaing Session Variables

I'm using this code:

Dim strName
For Each strName in Session.Content s
Response.Write strName & " - " & Session.Content s(strName) & "<BR>"
Next

If I only do a response.write strName, it shows all the session names
but when I include the session.content s it gives me the following
error:

Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment

I've been to http://www.aspfaq.com/show.asp?id=2373 and it talks about
using ADODB.Recordset but I'm not accessing data on this page.

Any ideas why this is happening?

Thanks,

--
Jerry

Jul 21 '06
11 3727

Bob Barrows [MVP] wrote:
Jerry wrote:
>
Anyways, if you create a page containing only the snip of code
you've posted above, will the error occur?
Yes, an ASP page with only the following:
<%
Dim Item
For Each Item in Session.Content s
Response.Write Item & " - " & Session(Item) & "<BR>"
Next
%>
produces the same error.

If I remove the .Contents then I get the following error:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method
/trs/test.asp, line 3

I was just able to reproduce your error by using:
for each key in session.Content s
Response.Write "<BR>" & key & ": " & session.content s(key)
next

The error went away when I changed it to:
for each key in session.Content s
Response.Write "<BR>" & key & ": " & session(key)
next
Thanks Bob, I'll try that Monday morning and see how it works!

--
Jerry

Jul 22 '06 #11

Bob Barrows [MVP] wrote:
Jerry wrote:
>
Anyways, if you create a page containing only the snip of code
you've posted above, will the error occur?
Yes, an ASP page with only the following:
<%
Dim Item
For Each Item in Session.Content s
Response.Write Item & " - " & Session(Item) & "<BR>"
Next
%>
produces the same error.

If I remove the .Contents then I get the following error:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method
/trs/test.asp, line 3

I was just able to reproduce your error by using:
for each key in session.Content s
Response.Write "<BR>" & key & ": " & session.content s(key)
next

The error went away when I changed it to:
for each key in session.Content s
Response.Write "<BR>" & key & ": " & session(key)
next
Sorry for the delayed response. This does not work either.

--
Jerry

Jul 25 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5041
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I double-checked the path to my error log. It is in /var/www/logs/php_error_log Thanks. :) -Wayne Stevenson
1
1979
by: Karim M Ladhu | last post by:
I am having a little trouble with this... When trying to log in to my website via ASP, the local IIS host returns a page can not be displayed internal server error and starts complaining about invalid code. ---------------------------------------------- The error is: 500.100 Internal Server Error
4
1668
by: Bryan Tang | last post by:
I built an ASP to search the content in index server. It is ok if search in English. Whenever I search in Chinese, I will got the following error message, CreateRecordset ?u?~ '80004005' £gLak?u¢DXao?u?~ /search/query.asp, |C203
2
1620
by: Ross | last post by:
I am trying to pass a datatable from a page to another page in a different frame. The user would see the results of a query in the first frame then could navigate through the second frame to a page that uses the query data for another purpose. I kept getting null-object-reference errors when I tried to bind the data to a control in the second frame. In an attempt to trace the problem I set up a little test of session variables to see if...
2
1614
by: James Wallace | last post by:
I hope that someone can help me out there with this problem. I get an itermittant problem with our web page that occurs about once every 10 to 15 days where the only way to fix the problem is to bounce the web server. The error can be seen below. I have looked at the stack trace and determined where the error is occuring but when I look at my code, where it says that I have an unhandled exception, I have error handling to handle it. ...
2
2148
by: tshad | last post by:
This has been driving me crazy. I have been trying to get the error handling working on my system and can get parts of it working and others won't work at all. I found that you can't access session variables from Application_Error event, but I need to so I don't need to set up traces to see what they are during an error. I am emailing the error condition to myself when it happens.
2
2084
by: ras26 | last post by:
I have a WebSite "App1" which has an external assembly "Lib1". Inside this external assembly we have developed some classes that derive from "System.Web.UI.Page". One of these pages is called "WebNotification". In the WebSite "App1" we create an instance of "WebNotification", but when this class tries to access some Session variables it generates the following error: Session state can only be used when enableSessionState is set to...
2
3997
by: maansi.creations | last post by:
Service unavailable error comes randomly while accessing our website and gets alright in matter of seconds....Could some one tell the possible reasons for these to happen: i got a earlier suggestion to our error as follows: ------------------------------------------------------- If the error continues, it means that your website is exceeding the resource thresholds we set in IIS. Your website has been allocated 20% CPU and 800 MB of...
4
3752
by: Chronictank | last post by:
Hi, as a bit of background (and seeing as it is my first post :)) i am a complete newbie at perl. I literally picked it up a week ago to do this project as it seemed like the best choice for a language to connect to a SQL database in a Unix envirment as well as script parsing so there is more than likely a ton of things i could have done a better way. I have been at this for 3 days now and cant for the life of me work out why the code is...
0
9529
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10231
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10013
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9054
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5443
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2927
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.