Hello Everyone,
I am having a very curious error within my infopath form that i am trying to nail down but haven't been able to. First off, i am using infopath 2007 (c#) and hosting my form inside the formControl in a windows application (also c#).
I am getting the "Attempt to read or write protected memory" error on 2 specific lines in my code - one is where i simply try to insert a new node
node.InsertAfter(node.OuterXml);
and one is where i try to set a value using setValue()
formControl1.XmlForm.MainDataSource.CreateNavigator( ).SelectSingleNode( "/my:MF/my:CRN", xmlnsm ).SetValue( currentRecordNumber.ToString( ) );
"/my:MF/my:CRN", xmlnsm ).SetValue( currentRecordNumber.ToString( ) ); These two things seem to be related in that if i can fix one line so that i don't get the protected memory error the other line throws an error and vice versa (not sure if this is important).
This is the LAST thing that is impeding my project, once i get this sorted out the app will work perfectly. Any help would kindly be appreciated!
Thanks,
Erin