Classes

D

Duncan Welch

Hi,

In trying to reduce database calls, I've created a class (we'll call it
MyClass) which is created in the login page. I'm trying to store it in a
session variable, and when I call the code:

Class Security
...
End Class

SET objSecurty = new Security
....
Session("Security") = objSecurity

On the session() = line, I get the error:

Session object error 'ASP 0185 : 80020003'
Missing Default Property
/login.asp, line 123
A default property was not found for the object.

Anyone got any ideas?

Thanks in advance,

Dunc
 
P

PL

Session("Security") = objSecurity

How about Session("Security") = objSecurity ?

You will probably still get an error because you cannot store classes
created in VBScript into a session variable, the classes and object
instances of that class lives on that page, when you leave the page it is dead.

You need to create a component instead in VB or VC++.

PL.
 
P

PL

How about Session("Security") = objSecurity ?

That should be SET Session("Security") = objSecurity

But like I said, it wont work, at least not anywhere else
than on that page.

PL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,142
Messages
2,570,817
Members
47,363
Latest member
eitamoro

Latest Threads

Top