<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Dynamically pulling data for data connection</title><link>https://www.infopathdev.com:443/forums/thread/66228.aspx</link><pubDate>Mon, 02 May 2011 19:53:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66228</guid><dc:creator>Caeanis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66228.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=66228</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I am using IP2007.&amp;nbsp;&amp;nbsp; Thank you!&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Dynamically pulling data for data connection</title><link>https://www.infopathdev.com:443/forums/thread/61268.aspx</link><pubDate>Wed, 10 Nov 2010 18:37:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61268</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61268.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=61268</wfw:commentRss><description>&lt;p&gt;Hi --&lt;/p&gt;&lt;p&gt;I&amp;#39;ve read your 3 posts, and confess I&amp;#39;m confused. Is this IP 2007? or 2003? This comment in your code confused me: &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;#39;vb doesn&amp;#39;t use xDocument, so I cheated and added a reference to Microsoft.Office.Interop.InfoPath&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;As far as that horrid error, I&amp;#39;m guessing you are getting this in preveiw, is that the case?&lt;/p&gt;&lt;p&gt;If so, try opening the form as if you were going to fill it out rather than previewing. Sometimes you get a better error message. Usually if I get that error in preview, it is because I&amp;#39;ve set preview to use a data file and deleted or moved the data file.&lt;/p&gt;</description></item><item><title>Re: Dynamically pulling data for data connection</title><link>https://www.infopathdev.com:443/forums/thread/61266.aspx</link><pubDate>Wed, 10 Nov 2010 18:22:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61266</guid><dc:creator>Caeanis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61266.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=61266</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Again I spoke too soon.&amp;nbsp; Now after changing my secondary data connection to the&amp;nbsp; web service, the form gets an error before coming up.&amp;nbsp; &amp;quot;Infopath is unable to open the form&amp;quot;.&amp;nbsp; No other info.&amp;nbsp; I tried setting breakpoints in the code in case that was where the problem was but it is erroring before hitting my code.&amp;nbsp; I am currently running the web service locally from localhost so maybe that is where the problem is, or maybe it isn&amp;#39;t pulling the data back fast enough to populate the form.&amp;nbsp; Not sure.&amp;nbsp; Is there a way to &amp;quot;debug&amp;quot; the initial start up of the form so determine where the problem is?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Dynamically pulling data for data connection</title><link>https://www.infopathdev.com:443/forums/thread/61158.aspx</link><pubDate>Mon, 08 Nov 2010 16:17:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61158</guid><dc:creator>Caeanis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61158.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=61158</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Ok I am trying something here.&amp;nbsp; I&amp;#39;ll post the code and if someone can tell me if I&amp;#39;m on the right track or if there are specific reasons why I shouldn&amp;#39;t do it this way, please let me know.&amp;nbsp; Currently this code pulls the whole set of data over, and then swaps out the part I&amp;#39;d been filtering to.&amp;nbsp; My goal is to figure out how to do this so that I&amp;#39;m only pulling the info from the web service.&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; vb doesn&amp;#39;t use xDocument, so I cheated and added a 
reference to Microsoft.Office.Interop.InfoPath&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim mgr as String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim xDoc As XDocument&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oldData As 
XmlNode&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; mgr = UCase(Environ(&amp;quot;UserName&amp;quot;))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; I&amp;#39;m using the above line real-time, for testing I&amp;#39;m using a manager&amp;#39;s Login Id&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mgr = &amp;quot;MAYOUNG&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; reference to my webservice&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim myData As New tar.Service1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim myNode As XmlNode&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; retrieve the xml node from the webservice specifically for this manager&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myNode = myData.GetData(mgr)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; set the xDoc object to this document&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xDoc = Me&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; set oldData xmlnode to the top node in the secondary data source, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; I want to figure out a way to replace or populate it before the form loads if possible&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oldData = xDoc.DOM.selectSingleNode(&amp;quot;/Data&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; Use the replace child method to swap out the whole data set for just the nodes pertinent to the current manager.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xDoc.DOM.replaceChild(oldData, myNode) &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Dynamically pulling data for data connection</title><link>https://www.infopathdev.com:443/forums/thread/61156.aspx</link><pubDate>Mon, 08 Nov 2010 13:53:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61156</guid><dc:creator>Caeanis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61156.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=61156</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I have a form which I have set up to filter data in a universal data connection based on the user&amp;#39;s login.&amp;nbsp; The underlying xml file is 2.5 mb and takes a while to load.&amp;nbsp; It seems that filtering also is taking longer than I&amp;#39;d expect as well.&amp;nbsp; I decided to try to dynamically pull the filtered data from the xml file via a web service which I&amp;#39;ve been able to do.&amp;nbsp; When I run the code to pull the data I get back an xml node that contains what I want, however I&amp;#39;m not sure how to use this to populate the secondary datasource my controls are set to.&amp;nbsp; Ideally I would like to have this pulled on the load event or internal startup so that I&amp;#39;m not pulling the whole file, and then pulling an extract.&amp;nbsp; I feel like I&amp;#39;m almost there but the &amp;#39;ol noggin isn&amp;#39;t firing on all cylinders.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Caeanis &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>