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

R

Rob Blitz

I keep getting this error on this line of code:

error:
COM object that has been separated from its underlying RCW can not be used.
at
Microsoft.Office.Interop.InfoPath.SemiTrust.DOMDocument50Wrapper.selectSingl
eNode(String queryString)
at
Microsoft.Office.Interop.InfoPath.SemiTrust.DOMDocument50Wrapper.selectSingl
eNode(String queryString)
at ExpenseReport_v2.ExpenseReport_v2.SetTripDays() in
c:\_dev\infopathdev\expensereport\02\expensereport_v2\formcode.cs:line 81
at
ExpenseReport_v2.ExpenseReport_v2.TripFromDate_OnAfterChange(DataDOMEvent e)
in c:\_dev\infopathdev\expensereport\02\expensereport_v2\formcode.cs:line 48
at
Microsoft.Office.Interop.InfoPath.SemiTrust._DataDOMEventSink_SinkHelper.OnA
fterChange(DataDOMEvent pDataDOMEvent)

code:
IXMLDOMNode tripToNode = mainDOM.selectSingleNode("//my:TripToDate");

Any ideas of what could cause this? The field i'm changing in the form is a
date field and it's hooked up to a OnAfterChange handler.
 
J

Josh Bertsch [MSFT]

Mike Surface was getting this error this morning. Steve replied. Have you
had a look at that thread?

--josh bertsch
 
R

Rob Blitz

Didn't see the thread until after I posted. Sorry.

I did Google on it. The relevant MS KB article refers to the error in the
context of server-side web programming and came out in June of 2003. The
hotfix it references was supposed to be rolled into the .NET Framework 1.1
(which I'm using.)

http://support.microsoft.com/default.aspx?scid=kb;EN-US;818612

I'm not sure how any of this relates to InfoPath however.
 

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