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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server.CreateObject("Msxml2.FreeThreadedDOMDocument.4.0")

Status
Not open for further replies.

thuraivan

Technical User
Dec 11, 2001
8
IN
Hi...

I have created an ASP Application Variable for an XML File that will be used frequently day-in-and-day-out... with the help of the following lines in the global.asa file of IIS 5.0:

<Script language= &quot;Vbscript&quot; runat = server>
Sub Application_OnStart()

Set Application(&quot;Q&A&quot;) = Server.CreateObject_
(&quot;Msxml2.FreeThreadedDOMDocument.4.0&quot;)
Application(&quot;Q&A&quot;).async = false
Application(&quot;Q&A&quot;).load(Server.MapPath_
(&quot;QuestionAndAnswer.xml&quot;)
End Sub
</Script>

Everything is fine... The problem i face is when some entry is inserted into the above xml file, by someone... it doesn't reflect in the output (The output is done thru' a server side XSL transformation)... though the entry is physically available in the xml file...

How to refresh the ASP Application Variable periodically... or as and when a change occurs in the xml file.. and what are the performance implications of such an act...

Thanks...

Thiyaga Thuraivan

 
Hi...

I got the answer to the above...

What i missed out was to use -

Application.lock()
Application(&quot;Q&A&quot;).Save(Server.MapPath_
(&quot;QuestionAndAnswer.XML&quot;))
Application.unlock()

Pretty silly on my part eh?... Sorry, for that...

However, if someone has got any other idea, please let me know...

Thuraivan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top