<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Dynamic Data Connections, Query Data Source</title><link>https://www.infopathdev.com:443/forums/thread/71595.aspx</link><pubDate>Tue, 01 Nov 2011 17:44:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:71595</guid><dc:creator>Charles the Red</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/71595.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=71595</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I had begun working on a project in InfoPath 2010. Our forms must pull data from libraries that are relative to their current location in the website. Therefore, I cannot hardcode the Connections. In 2010 this was a relatively straight forward process using SharePointListRWQueryConnection and editing the URL and listID, a la:&lt;/p&gt;&lt;p&gt;SharePointListRWQueryConnection sp = (SharePointListRWQueryConnection)this.DataConnections[&amp;quot;String&amp;quot;];&lt;/p&gt;&lt;p&gt;sp.SiteURL = &amp;quot;msdn.microsoft.com&amp;quot;;&lt;/p&gt;&lt;p&gt;sp.ListID = ID;&lt;/p&gt;&lt;p&gt;Howerver, in 2007 there is only a SharePointListQueryConnection. The SiteURL and subsequent fields are read only, which makes my method impossible to implement. Is there another way to accomplish my task? Note that I would very much prefer to use SharePoint Lists.&lt;/p&gt;</description></item></channel></rss>