<?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: Sqlserver update  from inside javascript code?</title><link>https://www.infopathdev.com:443/forums/thread/60114.aspx</link><pubDate>Fri, 08 Oct 2010 23:22:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60114</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60114.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=60114</wfw:commentRss><description>&lt;p&gt;Hi Maureen,&lt;/p&gt;
&lt;p&gt;Yes, we have a free trial of one that you can look at. I&amp;#39;m not trying to sell you that, but it was the first thing we built when we left Microsoft - basically, because everyone needs it. We sell these inexpensive &amp;quot;accelerators&amp;quot; as a way to defray cost of the forum and other development work that we are doing. We have hundreds of people using it and have very low cost options if the trial works for you.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;</description></item><item><title>Re: Sqlserver update  from inside javascript code?</title><link>https://www.infopathdev.com:443/forums/thread/60091.aspx</link><pubDate>Fri, 08 Oct 2010 11:11:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60091</guid><dc:creator>Maureen57</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60091.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=60091</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi Patrick,&lt;/p&gt;&lt;p&gt;&amp;nbsp;Wouldn&amp;#39;t want to do anything that&amp;#39;s not best practice.&amp;nbsp;&amp;nbsp; And certainly wouldn&amp;#39;t want to clutter up the forum with javascript questions.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;I&amp;#39;m&amp;nbsp; familiar with using Sharepoint webservices from within Infopath... Are there SQLServer webservices that I can invoke from Infopath?&lt;/p&gt;&lt;p&gt;&amp;nbsp;Or do I have to write my own webservice?&amp;nbsp; That sounds intense.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Thanks,&lt;/p&gt;&lt;p&gt;Maureen57 &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Sqlserver update  from inside javascript code?</title><link>https://www.infopathdev.com:443/forums/thread/60069.aspx</link><pubDate>Thu, 07 Oct 2010 17:50:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60069</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60069.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=60069</wfw:commentRss><description>&lt;p&gt;Hi Maureen52,&lt;/p&gt;
&lt;p&gt;Best practice is not to use code. Why are you trying to update the database connection with javascript? That&amp;#39;s not necessary. Best practice is to use Web Services when connecting to databases. Doing updates via code will only cause you pain when the schema changes down the road - as it invariably will. Just don&amp;#39;t do it.&lt;/p&gt;
&lt;p&gt;Also, please note: this forum is for InfoPath issues, not SQL database coding via javascript. &lt;/p&gt;
&lt;p&gt;Respectfully,&lt;/p&gt;</description></item><item><title>Sqlserver update  from inside javascript code?</title><link>https://www.infopathdev.com:443/forums/thread/60058.aspx</link><pubDate>Thu, 07 Oct 2010 14:56:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:60058</guid><dc:creator>Maureen57</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/60058.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=60058</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m trying to update a secondary data connection from inside javascript code connected to a button.&amp;nbsp;&amp;nbsp; SQLserver database&lt;/p&gt;
&lt;p&gt;I know SQL, but cannot get this update statement to work.&amp;nbsp; &lt;strong&gt;updatedate&lt;/strong&gt; is a valid datetime variable.&amp;nbsp;&amp;nbsp;&amp;nbsp; Code segment&amp;nbsp; -----&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;var query = &amp;quot;update TRANSMARTSPOD SET [EmailDate] = &amp;quot; + &lt;strong&gt;updatedate&lt;/strong&gt; + &amp;quot; ; commit; &amp;quot;; &lt;/li&gt;
&lt;li&gt;XDocument.DataObjects(&amp;quot;TRANSMARTSPOD&amp;quot;).DOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;,&amp;#39;xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot; xmlns:d=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields&amp;quot; &amp;#39;); &lt;/li&gt;
&lt;li&gt;XDocument.DataObjects(&amp;quot;TRANSMARTSPOD&amp;quot;).QueryAdapter.Command = query; &lt;/li&gt;
&lt;li&gt;XDocument.DataObjects(&amp;quot;TRANSMARTSPOD&amp;quot;).QueryAdapter.Query(); &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Error message during form preview is&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;quot;The query cannot be run for the following DataObject: TRANSMARTSPOD&lt;br /&gt;InfoPath cannot run the specified query. &lt;br /&gt;[0x80040E14][Microsoft OLE DB Provider for SQL Server] Incorrect syntax near &amp;#39;52&amp;#39;.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>