<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Need help with autopopulate and update</title><link>https://www.infopathdev.com:443/forums/thread/19467.aspx</link><pubDate>Tue, 01 May 2007 20:43:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19467</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19467.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19467</wfw:commentRss><description>&lt;p&gt;There are multiple ways of accomplishing this.&amp;nbsp; I am not sure if you are using another form as a template or starting from scratch or if you are using code or just using rules.&amp;nbsp; To test this and do some learning I would recommend creating a new form from scratch.&amp;nbsp; Select Database as the type&amp;nbsp;and connect it to&amp;nbsp;your datasource and select the table on your sql server which has the records you want to read or you can use the sample Northwinds DB.&amp;nbsp; What you will get is a sample form that has&amp;nbsp;all of the fields of your table in the data source, both under queryfields and&amp;nbsp;datafields. Drag the queryfields folder into the query area as a section with controls and drag your datafields folder into the lower section as a repeating table. You can immediatly preview the form.&amp;nbsp; Enter an ID number in the field under query or some other indexed data and select the query button. This should display below the data records that match.&lt;/p&gt;&lt;p&gt;So in your case you would have a dropdown and when it was selected you would set the value of the approriate field under queryfields and then query the dataconnection.&lt;/p&gt;&lt;p&gt;Hopefully this&amp;nbsp;can get you started experimenting with dataconnections to a DB.&lt;/p&gt;&lt;p&gt;Webservices are better but if you just need simple interaction with a table this works.&amp;nbsp; Unfortunately with InfoPath you have a limitation of only having one table you can query and submit to. You can get around this with web services.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Need help with autopopulate and update</title><link>https://www.infopathdev.com:443/forums/thread/19461.aspx</link><pubDate>Tue, 01 May 2007 16:57:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19461</guid><dc:creator>Clothahump</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19461.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=19461</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m a total noob with Infopath.&amp;nbsp; I&amp;#39;m trying to design a screen where the user selects an ID number from a dropdown.&amp;nbsp; The app then reads a record from a SQL Server table and populates fields for subsequent update.&amp;nbsp; For the life of me, I cannot figure out how to do this in Infopath.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I found a website&amp;nbsp;that kinda explained it.&amp;nbsp; The sample they gave was looking up a company address, etc. through entry of a company id.&amp;nbsp; Sounds pretty much like what I wanted, so I copied their code and changed it to point to my datasource, etc.&amp;nbsp;&amp;nbsp; The website is &lt;a href="http://radio.weblogs.com/0131777/stories/2004/02/27/howToPopulateItemsFromASecondaryDataSource.html"&gt;http://radio.weblogs.com/0131777/stories/2004/02/27/howToPopulateItemsFromASecondaryDataSource.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I am getting an error on line 14:&amp;nbsp; Xdocument.DOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, &amp;#39;xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:q=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/queryFields&amp;quot; xmlns:d=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields&amp;quot; xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot; xmlns:my=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-04-30T13:57:22&amp;quot; xmlns:xd=&amp;quot;http://schemas.microsoft.com/office/infopath/2003&amp;quot;&amp;#39;); &lt;/p&gt;&lt;p&gt;The error message says that Xdocument is undefined.&amp;nbsp; I have two questions:&lt;/p&gt;&lt;p&gt;1.&amp;nbsp; Is there an easier way to do what I want to do than what is shown on that website?&amp;nbsp; If so, what do I need to do?&lt;/p&gt;&lt;p&gt;2&amp;nbsp; If not, how do I fix the Undefined error?&lt;/p&gt;&lt;p&gt;Thanks!!&lt;/p&gt;</description></item></channel></rss>