<?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>Re: How to Get data connection data in my button click event ?</title><link>https://www.infopathdev.com:443/forums/thread/53613.aspx</link><pubDate>Tue, 13 Apr 2010 06:57:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53613</guid><dc:creator>denfer06</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53613.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53613</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I finally get some information on the net and the following link help me a lot:&lt;/p&gt;&lt;p&gt;http://blogs.msdn.com/timpash/archive/2006/06/12/CSharp-And-Secondary-Datasources.aspx&lt;/p&gt;&lt;p&gt;&amp;nbsp;below is what I did:&lt;/p&gt;DOMDocument50 FolderList = (DOMDocument50)thisXDocument.GetDOM(&amp;quot;qry_InfoPath_NetworkStructure&amp;quot;);&lt;br /&gt;&lt;p&gt;FolderList.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;quot;xmlns:dfs=&amp;#39;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;#39;&amp;quot; + &amp;quot; xmlns:d=&amp;#39;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields&amp;#39;&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; &lt;br /&gt;&amp;nbsp;//Loop on each Network Settings&lt;br /&gt;&amp;nbsp;foreach (IXMLDOMNode Folder in FolderList.selectNodes(&amp;quot;/dfs:myFields/dfs:dataFields/d:qry_InfoPath_NetworkStructure/@Path&amp;quot;))&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!Directory.Exists(Folder.text))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Directory.CreateDirectory(Folder.text);&lt;br /&gt;} &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Hope that will help Infopath beginner like me&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>How to Get data connection data in my button click event ?</title><link>https://www.infopathdev.com:443/forums/thread/53574.aspx</link><pubDate>Mon, 12 Apr 2010 12:50:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53574</guid><dc:creator>denfer06</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53574.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53574</wfw:commentRss><description>&lt;p&gt;Hello &lt;br /&gt;&lt;/p&gt;&lt;p&gt;I&amp;#39;m using InfoPath 2007 and my code is developped with C#&lt;/p&gt;&lt;p&gt;My form is connected to a SQL Server where I get list of network Path from an SQL view &amp;quot;qry_InfoPath_NetworkStructure&amp;quot;.&lt;/p&gt;&lt;p&gt;The query return ID &amp;amp; Path columns.&lt;/p&gt;&lt;p&gt;I have created a drop down list connected to this data source to make sure I can get the value from the server.&lt;/p&gt;&lt;p&gt;this work fine and I can see and select Path&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Then I have created a button &amp;quot;Create folder&amp;quot; in my form that should create folders using Paths get from the view.&lt;/p&gt;I have edited the button code event&amp;nbsp; &amp;quot;public void Btn_CreateFolder_OnClick(DocActionEvent e)&amp;quot;&lt;p&gt;and add the below sentence but I didn&amp;#39;t get anything :&lt;/p&gt;&lt;p&gt;IXMLDOMNodeList folderList = thisXDocument.DOM.selectNodes(&amp;quot;/dfs:myFields/dfs:dataFields/d:qry_InfoPath_NetworkStructure/@Path&amp;quot;); &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Now I stack on how to get these Path list.&lt;/p&gt;&lt;p&gt;I&amp;#39;m missing something ? &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Any help will be welcomed&lt;/p&gt;&lt;p&gt;Thanks &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" /&gt;&lt;/p&gt;</description></item></channel></rss>