> I'm using a COM object to parse an XML doc:
> 
>   <cfobject action="CREATE" class="Microsoft.XMLDom" type="COM"
> name="xmlDoc">
> 
> That works fine as long as I only have one page.
> 
> But once I've loaded the document, I want to keep it in memory
> across pages. I put it in a session variable:
> 
>   Session.xmlDoc = xmlDoc;
> 
> and in the next page, when I do
> 
>   <cfif isDefined("Session.xmlDoc") EQ "true">
> 
> I get the right answer. BUT, I can't access any of the 
> object's properties.
> 
>   Error resolving parameter XMLDOC.SAVE 
>   The object SAVE is not present in the scope named XMLDOC
> 
> Is there any way round this?

I haven't tried using that object in a persistent memory scope, but I've
done that with other objects, just for testing. I've been able to do it by
creating the object in the memory scope at the beginning:

<cfobject name="Session.xmlDoc" ...>

I should warn you, however, that it's not a good idea to do this, from a
scalability perspective. You want to release COM objects as quickly as
possible, generally, and might run into some wacky problems if you try to
persist them.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to