Thanks for the advice Dave.
In the end I did get it to work using the code that I posted -
not sure what it was I did that stopped it working before.
Fortunately I don't have to worry too much about scalability
here as this is not a web site but effectively a single-user
application :o)
Thanks
Nick
-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 17, 2000 2:15 AM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: CFOBJECT & Sessions
> 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
**********************************************************************
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system.
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone.
Thank you for your co-operation.
**********************************************************************
------------------------------------------------------------------------------
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.