<?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>SQL Database Integration</title><link>https://www.infopathdev.com:443/forums/47.aspx</link><description>For questions concerning issues in the integration of SQL and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Copy of data from DB</title><link>https://www.infopathdev.com:443/forums/thread/17392.aspx</link><pubDate>Fri, 01 Sep 2006 06:51:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17392</guid><dc:creator>tatopitta</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17392.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17392</wfw:commentRss><description>Thank you guys, you're great!</description></item><item><title>Re: Copy of data from DB</title><link>https://www.infopathdev.com:443/forums/thread/17391.aspx</link><pubDate>Thu, 31 Aug 2006 19:49:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17391</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17391.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17391</wfw:commentRss><description>You might take a look at this HowTo:&lt;a target="_blank" href=http://www.infopathdev.com/howto/tutorials/default.aspx?i=0bb37b4de44348408680a53a449f2353&gt;http://www.infopathdev.com/howto/tutorials/default.aspx?i=0bb37b4de44348408680a53a449f2353&lt;/a&gt; There is some code there that uses value typed into the XML to filter the results of the query.&lt;br /&gt;&lt;br /&gt;If you want to use code to create a custom SQL Query, take a look at this code (in C#, but you should be able to convert):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;// Get value from XML&lt;br /&gt;string name = thisXDocument.DOM.selectSingleNode( "//my:Name" ).text;&lt;br /&gt;&lt;br /&gt;// Set the query&lt;br /&gt;ADOAdapter dbConn = (ADOAdapter)thisXDocument.DataObjects["Project-WorkItems"].QueryAdapter;&lt;br /&gt;dbConn.Command = "SELECT col1, col2 FROM table WHERE Name = \"" + name + "\"";&lt;br /&gt;// Issue the query&lt;br /&gt;thisXDocument.DataObjects["Project-WorkItems"].Query();&lt;/pre&gt;</description></item><item><title>Re: Copy of data from DB</title><link>https://www.infopathdev.com:443/forums/thread/17390.aspx</link><pubDate>Thu, 31 Aug 2006 07:43:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17390</guid><dc:creator>tatopitta</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17390.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17390</wfw:commentRss><description>Hi Patrick, forget the first question, please :)&lt;br /&gt;&lt;br /&gt;How can I use in my SQL statement a parameter which receives values from a XML field in the form?</description></item><item><title>Re: Copy of data from DB</title><link>https://www.infopathdev.com:443/forums/thread/17389.aspx</link><pubDate>Thu, 31 Aug 2006 07:22:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17389</guid><dc:creator>tatopitta</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17389.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17389</wfw:commentRss><description>Yeah Patrick,&lt;br /&gt; I'm trying to use JScript code but I have a problem:&lt;br /&gt;my SQL secondary datya source is named "ProjectManagers" but the following line&lt;br /&gt;&lt;br /&gt;var theDataObject = XDocument.DataObjects("ProjectManagers").DOM;&lt;br /&gt;&lt;br /&gt;gives me an error becouse the object is null...how can it be possible if the name ProjectManagers is correct?&lt;br /&gt;&lt;br /&gt;Can i set parameters for SQL statement in the datasource?&lt;br /&gt;&lt;br /&gt;Thank you very much!&lt;br /&gt;</description></item><item><title>Re: Copy of data from DB</title><link>https://www.infopathdev.com:443/forums/thread/17388.aspx</link><pubDate>Thu, 31 Aug 2006 07:13:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17388</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17388.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17388</wfw:commentRss><description>Hi Tatopitta!&lt;br /&gt;Are you asking whether you can copy the values from your secondary data source to your main data source? If so, yes, but you'll either need a) rules for each field which could be a pain to manage, or b) write some code to do it. I hope this helps.</description></item><item><title>Copy of data from DB</title><link>https://www.infopathdev.com:443/forums/thread/16848.aspx</link><pubDate>Tue, 29 Aug 2006 14:58:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16848</guid><dc:creator>tatopitta</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16848.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=16848</wfw:commentRss><description>hi all,&lt;br /&gt;I have a secondary data connection with a SQL database to retrieve data to be displayed in a repeating table. I need to "copy" the values from the database in nodes of the XML document.Is it possible?&lt;br /&gt;&lt;br /&gt;Than you</description></item></channel></rss>