<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Asynchronous programming via C#</title><link>https://www.infopathdev.com:443/forums/thread/117071.aspx</link><pubDate>Thu, 24 Aug 2017 06:57:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:117071</guid><dc:creator>kromeda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/117071.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=117071</wfw:commentRss><description>Hello,
question to c# users
does anyone tryied to use async thread in InfoPath? So it can make heavy calculation work (or read data from db) in another thread? It doesn&amp;#39;t look like form is &amp;quot;Not responsing&amp;quot; and all user controls become grey untill process is over.
Here&amp;#39;s simple example:

XPathNavigator xp = MainDataSource.CreateNavigator();
string res = &amp;quot;Processing&amp;quot;;

Task.Factory.StartNew(() =&amp;gt;
xp.SelectSingleNode(&amp;quot;/my:myFields/my:status&amp;quot;, NamespaceManager).SetValue(res));

when code is hit message appears &amp;quot;Microsoft.Office.InfoPath.Client.Internal.Host.Interop.pdb not loaded&amp;quot; and AccessVioletionException. So InfoPath is not familiar to this technology?</description></item></channel></rss>