<?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: Memory problems</title><link>https://www.infopathdev.com:443/forums/thread/35524.aspx</link><pubDate>Tue, 09 Dec 2008 06:51:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35524</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35524.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=35524</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;For every time you no need to connect your data source to shift the view. In button click, you have to check once you loaded using query connection. Using this If condition you can increase the performance and reducing to connection every time to secondary data source.&lt;/p&gt;
&lt;p&gt;Otherwise you can get these two data sources in onLoad, using this opening form takes little bit more time.&lt;/p&gt;
&lt;p&gt;After executing the file query connection it will release the connection and not required to close explicitly this connection in code.&lt;/p&gt;
&lt;p&gt;You can try ‘DataConnections&amp;#39; in the place of ‘DataSources&amp;#39;.&lt;/p&gt;</description></item><item><title>Memory problems</title><link>https://www.infopathdev.com:443/forums/thread/35495.aspx</link><pubDate>Mon, 08 Dec 2008 15:58:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35495</guid><dc:creator>BlindBoyGrunt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35495.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=35495</wfw:commentRss><description>&lt;p&gt;Hi &lt;/p&gt;
&lt;p&gt;I have a datasource that get&amp;#39;s it&amp;#39;s data from an xml-file. I now have two xml-files with the same structure but with differerent data. The customer wants to be able to switch between the two xml-files by clicking a button. The reason for this is that one file contains old data and the other new data so they would like to switch between them. They don&amp;#39;t want two datasources so in the code for the button I simly use this&lt;/p&gt;
&lt;p&gt;&amp;nbsp; FileQueryConnection fc= (FileQueryConnection)this.DataSources[&amp;quot;MyConnection&amp;quot;].QueryConnection&lt;br /&gt;&amp;nbsp; fc.FileLocation = _filePath + @&amp;quot;\&amp;quot; + fileName;&lt;br /&gt;&amp;nbsp; fc.Execute();&lt;/p&gt;
&lt;p&gt;It works with no problems switching data source but each time I do it the working memory Infopath uses increases and it doesn&amp;#39;t release it after the connection has been queried. &lt;/p&gt;
&lt;p&gt;The xml-files are about the 10 mb each and the memory infopath uses increases by 20-30Mb each time I switch data using the button. Is there any way I can release this memory properly? &lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Niclas&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>