<?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: Help Needed converting Jscript to C#</title><link>https://www.infopathdev.com:443/forums/thread/60550.aspx</link><pubDate>Thu, 21 Oct 2010 07:00:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60550</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60550.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=60550</wfw:commentRss><description>&lt;p&gt;Hi Pricey4,&lt;/p&gt;
&lt;p&gt;This isn&amp;#39;t much code to convert but we&amp;#39;re&amp;nbsp;pretty busy here trying to pay the bills. If you want to throw us a bone and donate $47 to the InfoPathDev cause, we&amp;#39;ll do it tomorrow. Go to Qdabra dot com&amp;#39;s support page and PayPal us $47 and we&amp;#39;ll do it tomorrow. If you think this is too &amp;quot;Pricey&amp;quot; 4 U, then I totally understand and hope that someone else with more time replies here for free ...&lt;/p&gt;</description></item><item><title>Help Needed converting Jscript to C#</title><link>https://www.infopathdev.com:443/forums/thread/60516.aspx</link><pubDate>Wed, 20 Oct 2010 10:10:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60516</guid><dc:creator>pricey4</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60516.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=60516</wfw:commentRss><description>&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;&lt;font size="3" face="Calibri"&gt;I have a form that was designed in Infopath 2007.&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;&lt;font size="3" face="Calibri"&gt;The form use’s Jscript and works fine but we are upgrading MS Office to 2010 &lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;&lt;font size="3" face="Calibri"&gt;And MS have now taken the Jscript functionality out of IP2010 the from will not run.&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;&lt;font size="3" face="Calibri"&gt;So I need to convert the Jscript to C#.&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN:0in 0in 10pt;" class="MsoNormal"&gt;&lt;font size="3" face="Calibri"&gt;But I’m not a programmer &lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/span&gt;so I am finding it difficult.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;The script is &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;// ****************************Code to change the sql Query for Face Days********************************* &lt;/p&gt;
&lt;p&gt;var FaceDaysSQL = &amp;quot;&amp;quot;; &lt;/p&gt;
&lt;p&gt;var FaceDaysSQL1 =&amp;quot;&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;// Retrieve the SQL statement of the data source&lt;/p&gt;
&lt;p&gt;&amp;nbsp;var FaceDaysSQL = XDocument.DataObjects[&amp;quot;Face days&amp;quot;].QueryAdapter.Command;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;//Retrieve the field in the InfoPath form whose value will be used in the WHERE clause &lt;/p&gt;
&lt;p&gt;var FaceDays =XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/dfs:queryFields/q:Face/@FaceDate&amp;quot;);&lt;/p&gt;
&lt;p&gt;// Generate the new SQL statement with WHERE clause&lt;/p&gt;
&lt;p&gt;&amp;nbsp;FaceDaysSQL1 = FaceDaysSQL + &amp;quot; and FaceDate = &amp;#39;&amp;quot; + FaceDays.text + &amp;quot;&amp;#39;&amp;quot;; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;// Populate the command with the new SQL statement&lt;/p&gt;
&lt;p&gt;&amp;nbsp;XDocument.DataObjects[&amp;quot;Face days&amp;quot;].QueryAdapter.Command = FaceDaysSQL1; &lt;/p&gt;
&lt;p&gt;// Run the query &lt;/p&gt;
&lt;p&gt;XDocument.DataObjects[&amp;quot;Face days&amp;quot;].Query();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;// change the Query back to orriganl query.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;XDocument.DataObjects[&amp;quot;Face days&amp;quot;].QueryAdapter.Command = FaceDaysSQL;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;any help would be a&lt;font size="3" face="Calibri"&gt;ppreciated&lt;/font&gt;&lt;/p&gt;</description></item></channel></rss>