错误类型:asp 中需要 Microsoft VBScript 运行时 (0x800A01A8) 对象
Error Type: Microsoft VBScript runtime (0x800A01A8) Object required in asp
我是新人asp..
并尝试使用 code
访问
但是它显示这样的错误。,
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
on line 163
显示的错误是因为这几行,
<%
do while not getgroups2.eof
pkOrgGroups2=getgroups2("pkOrgGroups")
ogGroup2=getgroups2("ogGroup")
ogLogo2 =getgroups2("ogLogo")
%>
我可以知道为什么我的代码会这样显示吗?
提前致谢。
有两种可靠的方法可以得到 "Object required" 错误:
在分配非对象时尝试使用 Set
:
>> Set x = "non-object/string"
>>
Error Number: 424
Error Description: Object required
正在尝试调用非对象的方法:
>> WScript.Echo TypeName(x)
>> If x.eof Then x = "whatever"
>>
Empty
Error Number: 424
Error Description: Object required
或:
>> x = "nix"
>> WScript.Echo TypeName(x)
>> If x.eof Then x = "whatever"
>>
String
Error Number: 424
Error Description: Object required
由于您发布的代码中没有 Set
,因此必须假设 getgroups2
不是一个对象。使用 TypeName() 检查。
我是新人asp..
并尝试使用 code
访问但是它显示这样的错误。,
Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' on line 163
显示的错误是因为这几行,
<%
do while not getgroups2.eof
pkOrgGroups2=getgroups2("pkOrgGroups")
ogGroup2=getgroups2("ogGroup")
ogLogo2 =getgroups2("ogLogo")
%>
我可以知道为什么我的代码会这样显示吗?
提前致谢。
有两种可靠的方法可以得到 "Object required" 错误:
在分配非对象时尝试使用 Set
:
>> Set x = "non-object/string"
>>
Error Number: 424
Error Description: Object required
正在尝试调用非对象的方法:
>> WScript.Echo TypeName(x)
>> If x.eof Then x = "whatever"
>>
Empty
Error Number: 424
Error Description: Object required
或:
>> x = "nix"
>> WScript.Echo TypeName(x)
>> If x.eof Then x = "whatever"
>>
String
Error Number: 424
Error Description: Object required
由于您发布的代码中没有 Set
,因此必须假设 getgroups2
不是一个对象。使用 TypeName() 检查。