Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application.StaticObjects - Using ObjectContext

Status
Not open for further replies.

rmckbrown

Programmer
Apr 24, 2002
6
US
I am trying to reference an object in the ASP
application.staticobjects collection from my VB component,
but I am unable to reference the object even though the
staticobjects count shows that something is there.

Ex. in the global.asa I have:
<OBJECT RUNAT=&quot;SERVER&quot; ID=&quot;SITEMETASTORE&quot;
PROGID=&quot;MSXML2.FreeThreadedDOMDocument&quot;
SCOPE=&quot;APPLICATION&quot;></OBJECT>

In my vb component I have:

Dim oXMLDoc As MSXML2.FreeThreadedDOMDocument
Dim oContext As ObjectContext
Dim oApp As ASPTypeLibrary.Application

Set oContext = GetObjectContext()
Set oApp = oContext(&quot;Application&quot;)

Set oXMLDoc = oApp.StaticObjects(&quot;SITEMETASTORE&quot;)

When attempting to set the oXMLDoc object to the static object (&quot;SITEMETASTORE&quot;) I receive an &quot;Object required&quot; error message. When I check the key (oapp.StaticObjects.Key(1)) it returns the value &quot;SITEMETASTORE&quot;, and the
StaticObjects.Count returns 1. Is it not possible to
reference a static object in your VB component.

Does anyone have some insite into this? Any help is
appreciated.

Info: VB6, ASP, IIS5, Windows 2000 Server

Thx.







 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top