<?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>SQL Database Integration</title><link>https://www.infopathdev.com:443/forums/47.aspx</link><description>For questions concerning issues in the integration of SQL and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Setting a query field and running a query on form open</title><link>https://www.infopathdev.com:443/forums/thread/20192.aspx</link><pubDate>Fri, 25 May 2007 19:14:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20192</guid><dc:creator>ssaral</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20192.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=20192</wfw:commentRss><description>Yep, I did place a condition on it...and seems to be working fine, the issue had to do with blank values...thanks...</description></item><item><title>Re: Setting a query field and running a query on form open</title><link>https://www.infopathdev.com:443/forums/thread/20188.aspx</link><pubDate>Fri, 25 May 2007 17:46:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20188</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20188.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=20188</wfw:commentRss><description>&lt;p&gt;Yah I tried it to and I think the rule on the field is the best solution. If you are having an issue with it executing more than once or early I would put some conditions on the rule to check the new value first or another field tht you can flag once it has been ran once.&amp;nbsp; I often use lots of expresion boxes to pop the field value in between each step to monitor what is happening to the value.&lt;/p&gt;&lt;p&gt;Good Luck&lt;/p&gt;</description></item><item><title>Re: Setting a query field and running a query on form open</title><link>https://www.infopathdev.com:443/forums/thread/20174.aspx</link><pubDate>Fri, 25 May 2007 13:23:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20174</guid><dc:creator>ssaral</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20174.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=20174</wfw:commentRss><description>I used rules on form open and said query data source when the query field is present and query data source when the query field is not blank but both of those didn&amp;#39;t work, but haven&amp;#39;t tried to place the rule on the query field it self....that seems to work but it is rather inconsistent, might have to do with the data....I&amp;#39;ll keep testing...thanks</description></item><item><title>Re: Setting a query field and running a query on form open</title><link>https://www.infopathdev.com:443/forums/thread/20159.aspx</link><pubDate>Fri, 25 May 2007 02:04:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20159</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20159.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=20159</wfw:commentRss><description>I have successfully used rules to query data connections in the form open rules.&amp;nbsp; Typically I believe your field value should be there but I am not sure.&amp;nbsp; Can you put a query rule on a field?&amp;nbsp;So that when the field is updated it would run the query? Can&amp;#39;t test at the moment but I believe you might.</description></item><item><title>Setting a query field and running a query on form open</title><link>https://www.infopathdev.com:443/forums/thread/20154.aspx</link><pubDate>Thu, 24 May 2007 20:27:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20154</guid><dc:creator>ssaral</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20154.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=20154</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I have a form in which you select a field value from an SQL db data connection, then click a button to launch another form&amp;nbsp;and send that selected value to the new form. This value arrives in&amp;nbsp;a query field in the new form that is connected to&amp;nbsp;a similar data connection.&amp;nbsp;The new form will query an SQL db based on this value when I press a&amp;nbsp;Run Query button and display the results I want. My questions is how can I execute&amp;nbsp;this queary when the new form opens without out having to press the&amp;nbsp;run Query button?&lt;/p&gt;&lt;p&gt;I&amp;#39;m using InfoPath 2003 SP2; below is the code I&amp;#39;m using to set the value in the new form:&lt;/p&gt;&lt;p&gt;var sFormAValue = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/dfs:dataFields/d:vw_ApplicationInformation/@AppInfoID&amp;quot;).text; &lt;br /&gt;var xdFormB = Application.XDocuments.NewFromSolution(&amp;quot;C:\\ARP_9.xsn&amp;quot;);&amp;nbsp;&lt;br /&gt;xdFormB.DOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:s0=&amp;quot;http://tempuri.org/&amp;quot; xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot; xmlns:ns1=&amp;quot;http://www.tempuri.org/dsFAF.xsd&amp;quot; xmlns:q=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/queryFields&amp;quot; xmlns:mime=&amp;quot;http://schemas.xmlsoap.org/wsdl/mime/&amp;quot; xmlns:tm=&amp;quot;http://microsoft.com/wsdl/mime/textMatching/&amp;quot; xmlns:soapenc=&amp;quot;http://schemas.xmlsoap.org/soap/encoding/&amp;quot; xmlns:soap=&amp;quot;http://schemas.xmlsoap.org/wsdl/soap/&amp;quot; xmlns:http=&amp;quot;http://schemas.xmlsoap.org/wsdl/http/&amp;quot; xmlns:ns2=&amp;quot;http://schemas.xmlsoap.org/wsdl/&amp;quot; xmlns:my=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-02-21T16:45:01&amp;quot; xmlns:xd=&amp;quot;http://schemas.microsoft.com/office/infopath/2003&amp;quot;&amp;#39;); &lt;br /&gt;xdFormB.DOM.selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/q:Glossary/@AppInfoID&amp;quot;).text = sFormAValue;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;When I tried to execute the query in the On Load Event&amp;nbsp;code section&amp;nbsp;it runs before the query value on the new form (target form) gets set, any ideas on how I can get this to work so it queries using the query value...thanks&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>