|
Home > Archive > IIS ASP > July 2005 > Application Object Or Variable!
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Application Object Or Variable!
|
|
|
| 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
| |
| Mark Schupp 2005-07-25, 6:06 pm |
|
"Arpan" <arpan_de@hotmail.com> wrote in message
news:1122196573.946356.36950@f14g2000cwb.googlegroups.com...
> 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>
--
Mark Schupp
| |
|
| Thanks Mark :-)
Regards,
Arpan
|
|
|
|
|