COM object that has been separated from its underlying RCW can not be used.

M

Mike Surface

Anyone seen this error before?

I have an InfoPath app that pings a web service to get a list of
search results. As the user navigates the list, I show the details of
the currently selected item in another area on the screen. I store
this currently selected item in a global variable. For small search
results, this works fine. For large search results (ie > 100) I get
the following error when trying to access properties of the global
object (like node.text = "false"):

"COM object that has been separated from its underlying RCW can not be
used."

Any ideas?

Also, to do this, I toggle a field on the results to true or false
depending on whether its selected or not, then I have a repeating
table only display the item that is set to true (all others will be
false). Is there a better way to do this? When I get large results, it
seems to take forever to actually write to the DOM - ie
thisXDocument.DOM.selectSingleNode("x").text = "true"
Takes forever if there's lots of xml data.

Mike.
 
S

Steve van Dongen [MSFT]

Anyone seen this error before?

I have an InfoPath app that pings a web service to get a list of
search results. As the user navigates the list, I show the details of
the currently selected item in another area on the screen. I store
this currently selected item in a global variable. For small search
results, this works fine. For large search results (ie > 100) I get
the following error when trying to access properties of the global
object (like node.text = "false"):
Please post relevent code fragment(s).
"COM object that has been separated from its underlying RCW can not be
used."

Any ideas?
No, but searching on Google appears to have hundreds of relevant
results.
Also, to do this, I toggle a field on the results to true or false
depending on whether its selected or not, then I have a repeating
table only display the item that is set to true (all others will be
false). Is there a better way to do this?
That's hard to say without more details of what you are try to doing
and without seeing any code. Most importantly, are you using InfoPath
SP1 or not?
When I get large results, it
seems to take forever to actually write to the DOM - ie
thisXDocument.DOM.selectSingleNode("x").text = "true"
Takes forever if there's lots of xml data.
Generally what takes time is any resulting validation & change event
processing, rules processing, and re-rendering the view. Updating one
DOM node value takes virtually no time. If you are making a large
number of changes it is more performant to make the changes in a batch
by creating an in-memory XMLNode node and then inserting/replacing the
entire structure into the DOM. The Data Interop SDK sample should
have an example of that; search through the script source for
"createNode".

Regards,
Steve
 
A

Andrew Ma [MSFT]

Hi Mike.

This problem has been reported and fixed. Watch for the final release. It
will contain the fix.
If you are running the final release, then you probably just need to gacutil
/cdl to update the cache.

--
Andrew J. Ma
Software Test Engineer
Microsoft Office InfoPath
http://blogs.msdn.com/ajma
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.
 
M

Mike Surface

Final Release?

I'm just using SP1 preview - where would I get the final release
version or is it publicly available yet?

M.
 
A

Andrew Ma [MSFT]

The SP1 Preview is a beta version. We will be releasing the final version of
SP1 soon.

--
Andrew J. Ma
Software Test Engineer
Microsoft Office InfoPath
http://blogs.msdn.com/ajma
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top