sandhu
sandhu

Reputation: 117

Error Type: Microsoft VBScript runtime (0x800A01A8) Object required in asp

I m new asp..

And tried to access with code

But it shows error like this.,

Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' on line 163

The error showed because of this lines,

<%
do while not getgroups2.eof 
    pkOrgGroups2=getgroups2("pkOrgGroups")
    ogGroup2=getgroups2("ogGroup")
    ogLogo2 =getgroups2("ogLogo")
%> 

May i know for which reason of my code it shows like this?

Thanks in advance.

Upvotes: 1

Views: 3717

Answers (1)

Ekkehard.Horner
Ekkehard.Horner

Reputation: 38745

There are two sure ways to get an "Object required" error:

Trying to use Set when assigning a non-object:

>> Set x = "non-object/string"
>>
Error Number:       424
Error Description:  Object required

Trying to call a method on a non-object:

>> WScript.Echo TypeName(x)
>> If x.eof Then x = "whatever"
>>
Empty
Error Number:       424
Error Description:  Object required

or:

>> x = "nix"
>> WScript.Echo TypeName(x)
>> If x.eof Then x = "whatever"
>>
String
Error Number:       424
Error Description:  Object required

As there is no Set in the code you posted, one has to assume that getgroups2 is not an object. Use TypeName() to check.

Upvotes: 3

Related Questions