<?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: Unable to write data to text control using vbscript</title><link>https://www.infopathdev.com:443/forums/thread/20515.aspx</link><pubDate>Thu, 07 Jun 2007 21:04:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20515</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20515.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20515</wfw:commentRss><description>&lt;p&gt;The &amp;#39;@&amp;#39; (typically pronounced &amp;#39;at&amp;#39;) symbol is used to differentiate an &amp;#39;at&amp;#39;tribute from an element. So &amp;#39;Item&amp;#39; is an element, while &amp;#39;@item&amp;#39; is an attribute.&lt;/p&gt;&lt;p&gt;Namespaces help keep names distinct and different. For example, there are lots of people in the world named Greg, but there are not as many named Greg Collins... so in this human name example, my personal namespace could be my surname and I could be represented as collins:greg to differentiate me from jones:greg or smith:greg. If someone called out for smith:greg, I would have no reason to answer. Make sense?&lt;/p&gt;&lt;p&gt;InfoPath uses the &amp;#39;my&amp;#39; namespace for everything, but a data source has a few different namespaces they use, as you see in your example &amp;#39;dfs&amp;#39;, &amp;#39;d&amp;#39; and no namespace at all in the case of the attribute.&lt;/p&gt;</description></item><item><title>Re: Unable to write data to text control using vbscript</title><link>https://www.infopathdev.com:443/forums/thread/20509.aspx</link><pubDate>Thu, 07 Jun 2007 15:34:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20509</guid><dc:creator>haket</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20509.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20509</wfw:commentRss><description>&lt;p&gt;i have my answer:&lt;/p&gt;&lt;p&gt;XDocument.DOM.selectSingleNode(&amp;quot;//dfs:myFields/dfs:dataFields/d:Table1/@Table1Item3&amp;quot;).text = &amp;quot;abc&amp;quot;&lt;/p&gt;&lt;p&gt;though dont ahve a clue why &amp;quot;dfs&amp;quot; and not &amp;quot;my&amp;quot; and &amp;quot;@&amp;quot;. Any tutorial i can read to understand these?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Unable to write data to text control using vbscript</title><link>https://www.infopathdev.com:443/forums/thread/20497.aspx</link><pubDate>Thu, 07 Jun 2007 08:22:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20497</guid><dc:creator>haket</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20497.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20497</wfw:commentRss><description>&lt;p&gt;The node names are as in the Data source.&amp;nbsp;I think you are right the issue may be with the namespaces because i have no clue how they work. is there a quick tutorial i can get my hands on. &lt;/p&gt;&lt;p&gt;This is what my Data source looks like if that is of any help. (For some reaon i am unable to upload its image file hence this representattion below). &lt;/p&gt;&lt;p&gt;Table1 is the primary table with three elemenst namely Table1Item1, Table1Item2 and Table1Item3. Table2 is another table with 3 elements too.&lt;/p&gt;&lt;p&gt;-----------------------------------------------------------&lt;/p&gt;&lt;p&gt;- myFields&lt;/p&gt;&lt;p&gt;&amp;nbsp; + queryFields&lt;/p&gt;&lt;p&gt;&amp;nbsp; - datFields&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - d:Table1&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table1Item1&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table1Item2&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table1Item3&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Table2&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table2Item1&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table2Item2&lt;/p&gt;</description></item><item><title>Re: Unable to write data to text control using vbscript</title><link>https://www.infopathdev.com:443/forums/thread/20488.aspx</link><pubDate>Wed, 06 Jun 2007 22:19:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20488</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20488.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20488</wfw:commentRss><description>&lt;p&gt;The select is failing, thus the .text property not valid.&lt;/p&gt;&lt;p&gt;Sounds like the issue is likely with the namespaces. Assuming the node names are all accurate, check to make sure each node has the appropraite namespace. For example, &amp;quot;my:&amp;quot; on dataFields looks suspicious to me.&lt;/p&gt;</description></item><item><title>Unable to write data to text control using vbscript</title><link>https://www.infopathdev.com:443/forums/thread/20480.aspx</link><pubDate>Wed, 06 Jun 2007 17:57:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20480</guid><dc:creator>haket</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20480.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=20480</wfw:commentRss><description>&lt;p&gt;To update a control field one of the articels uses the following code:&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;a name="OLE_LINK8"&gt;&lt;/a&gt;&lt;a name="OLE_LINK7"&gt;&lt;/a&gt;&lt;span&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;strStartDate = XDocument.DOM.selectSingleNode _&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0cm 0cm 0pt;"&gt;&lt;span&gt;&lt;span&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;(&amp;quot;/my:myFields/my:startDate&amp;quot;).text&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;I am trying to use the same syntax to populate a text field in my form:&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;em&gt;XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:dataFields/d:Table1/d:Table1Item3&amp;quot;).text = &amp;quot;abc&amp;quot;&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;However, The following error occurred:&lt;/p&gt;&lt;p&gt;Object required: &amp;#39;XDocument.DOM.selectSingleNode(...)&amp;#39;&lt;br /&gt;File:script.vbs&lt;br /&gt;Line:23&lt;br /&gt;&lt;/p&gt;&lt;p&gt;My form is connected to database with two tables - namely&amp;nbsp;&amp;quot;Table1&amp;quot; as the Primary and&amp;nbsp;the other one&amp;nbsp;&amp;quot;Table2&amp;quot;. &lt;/p&gt;&lt;p&gt;any help please.&lt;/p&gt;&lt;p&gt;&lt;a name="OLE_LINK6"&gt;&lt;/a&gt;&lt;a name="OLE_LINK5"&gt;&lt;/a&gt;&lt;span style="font-size:12pt;font-family:'Times New Roman';"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>