I'm using this code:
Dim strName
For Each strName in Session.Contents
Response.Write strName & " - " & Session.Contents(strName) & "<BR>"
Next
If I only do a response.write strName, it shows all the session names
but when I include the session.contents 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 11 3690
Jerry wrote:
I'm using this code:
Dim strName
For Each strName in Session.Contents
Response.Write strName & " - " & Session.Contents(strName) & "<BR>"
Next
If I only do a response.write strName, it shows all the session names
but when I include the session.contents 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? http://www.aspfaq.com/show.asp?id=2524
--
Mike Brind
Mike Brind wrote:
Jerry wrote:
I'm using this code:
Dim strName
For Each strName in Session.Contents
Response.Write strName & " - " & Session.Contents(strName) & "<BR>"
Next
If I only do a response.write strName, it shows all the session names
but when I include the session.contents 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?
http://www.aspfaq.com/show.asp?id=2524
Thanks Mike.
I tried the example and I get the following error:
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'Item'
So I added Dim Item and I get the original error messgae again:
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment
--
Jerry
"Jerry" <je*******@gmail.comwrote in message
news:11*********************@75g2000cwc.googlegrou ps.com...
>
Mike Brind wrote:
Jerry wrote:
I'm using this code:
>
Dim strName
For Each strName in Session.Contents
Response.Write strName & " - " & Session.Contents(strName) &
"<BR>"
Next
>
If I only do a response.write strName, it shows all the session names
but when I include the session.contents 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?
>
http://www.aspfaq.com/show.asp?id=2524
Thanks Mike.
I tried the example and I get the following error:
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'Item'
So I added Dim Item and I get the original error messgae again:
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment
--
Jerry
The code you have posted is correct assuming that Session and Response are
what we think they are and it is this code that is actually producing the
error and not something else.
Which version of IIS are we talking about?
Anthony Jones wrote:
"Jerry" <je*******@gmail.comwrote in message
news:11*********************@75g2000cwc.googlegrou ps.com...
Mike Brind wrote:
Jerry wrote:
I'm using this code:
Dim strName
For Each strName in Session.Contents
Response.Write strName & " - " & Session.Contents(strName) &
"<BR>"
Next
If I only do a response.write strName, it shows all the session names
but when I include the session.contents 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?
> http://www.aspfaq.com/show.asp?id=2524
Thanks Mike.
I tried the example and I get the following error:
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'Item'
So I added Dim Item and I get the original error messgae again:
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment
--
Jerry
The code you have posted is correct assuming that Session and Response are
what we think they are and it is this code that is actually producing the
error and not something else.
Which version of IIS are we talking about?
IIS 5.1
If I remove the session(Item) part, it will list the session names.
Dim Item
For Each Item in Session.Contents
Response.Write Item & "<BR>"
Next
Jerry wrote:
I'm using this code:
Dim strName
For Each strName in Session.Contents
Response.Write strName & " - " & Session.Contents(strName) & "<BR>"
Next
If I only do a response.write strName, it shows all the session names
but when I include the session.contents 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,
I've never used Session.Contents, but it should work. This is what I always
do:
For Each strName in Session
Response.Write strName & " - " & Session(strName) & "<BR>"
Next
Anyways, if you create a page containing only the snip of code you've posted
above, will the error occur?
--
Microsoft MVP - ASP/ASP.NET
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 [MVP] wrote:
Jerry wrote:
I'm using this code:
Dim strName
For Each strName in Session.Contents
Response.Write strName & " - " & Session.Contents(strName) & "<BR>"
Next
If I only do a response.write strName, it shows all the session names
but when I include the session.contents 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,
I've never used Session.Contents, but it should work. This is what I always
do:
For Each strName in Session
Response.Write strName & " - " & Session(strName) & "<BR>"
Next
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.Contents
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
Jerry wrote:
Bob Barrows [MVP] wrote:
Jerry wrote:
I'm using this code:
>
Dim strName
For Each strName in Session.Contents
Response.Write strName & " - " & Session.Contents(strName) & "<BR>"
Next
>
If I only do a response.write strName, it shows all the session names
but when I include the session.contents 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,
I've never used Session.Contents, but it should work. This is what I always
do:
For Each strName in Session
Response.Write strName & " - " & Session(strName) & "<BR>"
Next
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.Contents
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
Try:
Dim x
For Each x in Session.Contents
Response.Write x & " - " & Session(x) & "<BR>"
Next
%>
Just a theory, but Item is a keyword in VBScript. That might be the
cause of the error.
--
Mike Brind
Mike Brind wrote:
Jerry wrote:
Bob Barrows [MVP] wrote:
Jerry wrote:
I'm using this code:
Dim strName
For Each strName in Session.Contents
Response.Write strName & " - " & Session.Contents(strName) & "<BR>"
Next
If I only do a response.write strName, it shows all the session names
but when I include the session.contents 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,
>
I've never used Session.Contents, but it should work. This is what I always
do:
>
For Each strName in Session
Response.Write strName & " - " & Session(strName) & "<BR>"
Next
>
>
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.Contents
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
Try:
Dim x
For Each x in Session.Contents
Response.Write x & " - " & Session(x) & "<BR>"
Next
%>
Just a theory, but Item is a keyword in VBScript. That might be the
cause of the error.
Same error. I was initially using strName instead of Item but saw Item
in an example.
--
Jerry
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.Contents
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.Contents
Response.Write "<BR>" & key & ": " & session.contents(key)
next
The error went away when I changed it to:
for each key in session.Contents
Response.Write "<BR>" & key & ": " & session(key)
next
--
Microsoft MVP - ASP/ASP.NET
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 [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.Contents
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.Contents
Response.Write "<BR>" & key & ": " & session.contents(key)
next
The error went away when I changed it to:
for each key in session.Contents
Response.Write "<BR>" & key & ": " & session(key)
next
Thanks Bob, I'll try that Monday morning and see how it works!
--
Jerry
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.Contents
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.Contents
Response.Write "<BR>" & key & ": " & session.contents(key)
next
The error went away when I changed it to:
for each key in session.Contents
Response.Write "<BR>" & key & ": " & session(key)
next
Sorry for the delayed response. This does not work either.
--
Jerry This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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'
...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
| |