错误显示会话变量 [英] Error Displyaing Session Variables
问题描述
我正在使用此代码:
Dim strName
对于Session.Contents中的每个strName
响应。写strName& " - &安培; Session.Contents(strName)& "< BR>"
下一页
如果我只做一个response.write strName,它会显示所有的会话名称
但是当我包含session.contents时它给了我以下
错误:
Microsoft VBScript运行时错误''800a01c2''
错误的论点数或无效的财产分配
我去过 http://www.aspfaq.com/show.asp?id=2373 它谈到了
使用ADODB.Recordset但是我没有访问此页面上的数据。
任何想法为什么会发生这种情况?
谢谢,
-
Jerry
< br $>
Jerry写道:
我正在使用此代码:
Dim strName
对于Session.Contents中的每个strName
Re sponser.Write strName& " - &安培; Session.Contents(strName)& "< BR>"
下一页
如果我只做一个response.write strName,它会显示所有的会话名称
但是当我包含session.contents时它给了我以下
错误:
Microsoft VBScript运行时错误''800a01c2''
错误的论点数或无效的财产分配
我去过 http://www.aspfaq.com/show.asp?id=2373 它谈到了
使用ADODB.Recordset但是我没有访问此页面上的数据。
任何想法为什么会发生这种情况?
http://www.aspfaq.com/show.asp?id=2524
-
Mike Brind
Mike Brind写道:
Jerry写道:
< blockquote class =post_quotes>
我正在使用此代码:
Dim strName
对于Session.Contents中的每个strName
Response.Write strName& " - &安培; Session.Contents(strName)& "< BR>"
下一页
如果我只做一个response.write strName,它会显示所有的会话名称
但是当我包含session.contents时它给了我以下
错误:
Microsoft VBScript运行时错误''800a01c2''
错误的论点数或无效的财产分配
我去过 http://www.aspfaq.com/show.asp?id=2373 它谈到了
使用ADODB.Recordset但我没有访问此页面上的数据。
任何想法为什么会发生这种情况?
谢谢Mike。
我试过这个例子而我得到以下错误:
Microsoft VBScript运行时错误''800a01f4''
变量未定义:''项目''
所以我添加了Dim Item并且我再次获得原始错误messgae:
Microsoft VBScript运行时错误''800a01c2''
错误的参数数量或无效的财产分配
-
Jerry
" Jerry" < je ******* @ gmail.com写信息
新闻:11 ********************* @ 75g2000cwc .googlegrou ps.com ...
>
Mike Brind写道:
Jerry写道:
我正在使用此代码:
>
Dim strName
对于Session.Contents中的每个strName
Response.Write strName& " - &安培; Session.Contents(strName)&
"< BR>"
下一页
>
如果我只做一个response.write strName,它会显示所有会话名称
但是当我包含session.contents时它会给我以下
错误:
>
Microsoft VBScript运行时错误''800a01c2''
>
参数数量错误或属性无效分配
>
我去过 http://www.aspfaq.com/show.asp?id=2373 它使用ADODB.Recordset谈论
但是我''我没有访问此页面上的数据。
>
想知道为什么会这样吗?
>
谢谢Mike。
我试过这个例子我收到以下错误:
Microsoft VBScript运行时错误''800a01f4''
变量未定义:''项目''
>
所以我添加了Dim Item并且我再次获得原始错误messgae:
Microsoft VBScript运行时错误''800a01c2''
错误的论点数量或无效的财产分配
-
Jerry
您发布的代码是正确的,假设会话和响应是我们认为它们是什么
这个代码实际上产生了
错误,而不是别的。
我们在谈论哪个版本的IIS?
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
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?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?
>
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?
这篇关于错误显示会话变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!