Application Object Or Variable!

A

Arpan

The following code exists in a Global.asa file:

----------------------------------------------
<%
Set Application("Thing")=Server.CreateObject("THINGDOER.THINGY")
%>
----------------------------------------------

Will the above code snippet


create a non-object Application variable named "Thing" & place it in
the Contents collection of the Application object?

-----OR------

create an Application object named "Thing" & place it in the
StaticObjects collection of the Application object?

Thanks,

Arpan
 
M

Mark Schupp

Arpan said:
The following code exists in a Global.asa file:

----------------------------------------------
<%
Set Application("Thing")=Server.CreateObject("THINGDOER.THINGY")
%>
----------------------------------------------

Will the above code snippet


create a non-object Application variable named "Thing" & place it in
the Contents collection of the Application object?

-----OR------

create an Application object named "Thing" & place it in the
StaticObjects collection of the Application object?

Thanks,

Arpan

It will create an application variable and set it to an object. This is not
considered wise unless the object is designed specifically for a
multi-threaded environment.

If you want the object in the staticobjects collection you will need to use
an <object> tag in global.asa to create it (again, make sure it is designed
for this)>

<object id="thing" progid="THINGDOER.THINGY" runat="Server"
scope="Application"></object>
 

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
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top