<?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: Data Connection using Code</title><link>https://www.infopathdev.com:443/forums/thread/20438.aspx</link><pubDate>Tue, 05 Jun 2007 21:04:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20438</guid><dc:creator>aehicks</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20438.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20438</wfw:commentRss><description>You were correct.&amp;nbsp; Once I changed the Query() to Submit() it worked perfectly.&amp;nbsp; Thanks for your help.</description></item><item><title>Re: Data Connection using Code</title><link>https://www.infopathdev.com:443/forums/thread/20436.aspx</link><pubDate>Tue, 05 Jun 2007 20:42:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20436</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20436.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20436</wfw:commentRss><description>&lt;p&gt;Are you sure you didn&amp;#39;t misspell it? You code looks correct but the error says&amp;quot;DataAdaters&amp;quot; with a &amp;quot;p&amp;quot; missing :)&lt;/p&gt;&lt;p&gt;Also, to submit, you want to call .Submit() and not .Query()&lt;/p&gt;&lt;p&gt;You can read this for more details: &lt;a href="http://msdn2.microsoft.com/en-us/library/bb229877.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb229877.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Good luck!&lt;/p&gt;</description></item><item><title>Re: Data Connection using Code</title><link>https://www.infopathdev.com:443/forums/thread/20432.aspx</link><pubDate>Tue, 05 Jun 2007 20:19:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20432</guid><dc:creator>aehicks</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20432.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20432</wfw:commentRss><description>&lt;p&gt;Thanks for your help.&amp;nbsp; However, being new to InfoPath, I&amp;#39;m not really sure how to make the OnLoad handler work.&amp;nbsp; Let me explain more on how I was to use it.&amp;nbsp; I&amp;#39;ve written some code to run when the user clicks on the submit button.&amp;nbsp; On of the final lines of code will call a data connection called &amp;quot;submit&amp;quot;.&amp;nbsp; I wrote the following code:&amp;nbsp; &lt;/p&gt;&lt;p&gt;XDocument.DataAdapters(&amp;quot;submit&amp;quot;).Query()&lt;/p&gt;&lt;p&gt;When I tested it, I got the following error:&amp;nbsp; &amp;quot;&amp;quot;Object doesn&amp;#39;t support this property or method:&amp;nbsp; &amp;#39;XDocument.DataAdaters&amp;#39;&amp;quot;.&amp;nbsp; Again, I know nothing about data adapters, so if someone could help me with the correct syntax I would appreciate it.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks.&lt;/p&gt;</description></item><item><title>Re: Data Connection using Code</title><link>https://www.infopathdev.com:443/forums/thread/20329.aspx</link><pubDate>Sat, 02 Jun 2007 02:30:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20329</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20329.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20329</wfw:commentRss><description>&lt;p&gt;Well, in general, using the InfoPath OM is the same in both JScript and VBScript...&lt;/p&gt;&lt;p&gt;Here is an example of an OnLoad handler which queries a web service (assuming you have added &amp;quot;TestConnection&amp;quot; ws adapter in InfoPath Designer):&lt;/p&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Sub XDocument_OnLoad(eventObj)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;XDocument.DataAdapters(&amp;quot;TestConnection&amp;quot;).Query()&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;End Sub&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;In general, here is a good reference if you need to find out what objects exist and what the parameters are:&lt;/font&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb230145.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb230145.aspx&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 10pt;"&gt;Hope this helps.&lt;/p&gt;</description></item><item><title>Re: Data Connection using Code</title><link>https://www.infopathdev.com:443/forums/thread/20325.aspx</link><pubDate>Fri, 01 Jun 2007 22:38:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20325</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20325.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20325</wfw:commentRss><description>&lt;p&gt;Hi Aehicks andwelcome to the forum,&lt;/p&gt;&lt;p&gt;Unfortunately, we don&amp;#39;t do any VBScript coding. We recommend .NET, but we could give you some help with JS if you were using that.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Data Connection using Code</title><link>https://www.infopathdev.com:443/forums/thread/20305.aspx</link><pubDate>Thu, 31 May 2007 15:18:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20305</guid><dc:creator>aehicks</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20305.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20305</wfw:commentRss><description>Does anyone know how to use VBScript code to&amp;nbsp;invoke a data connection?</description></item></channel></rss>