<?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: Reading a Stored Procedure Output parameter</title><link>https://www.infopathdev.com:443/forums/thread/58865.aspx</link><pubDate>Fri, 10 Sep 2010 17:33:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58865</guid><dc:creator>brandtsmith</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58865.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=58865</wfw:commentRss><description>&lt;p&gt;I noticed that if you use :&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;DECLARE&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; @return_value &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;EXEC&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; @return_value &lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; [dbo]&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;.&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;[prInsertInvoice]&lt;/p&gt;
&lt;p&gt;@pInsuredID &lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 2090&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;,&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;@pDueDate &lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;#39;05/01/2010&amp;#39;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;SELECT&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;&amp;#39;Return Value&amp;#39;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; @return_value&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;as a data source to insert data into sql - you will get 2 rows inserted here...not one...only thing I can see doing it is the SELECT statement....which you need to get the return status...bummer...when I take out the SELECT statement only one row is inserted-but no Return Value is generated&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Reading a Stored Procedure Output parameter</title><link>https://www.infopathdev.com:443/forums/thread/49504.aspx</link><pubDate>Mon, 30 Nov 2009 05:21:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49504</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49504.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=49504</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;To the best of my knowledge, the only way to inspect the XML structure in this situation would be to follow the code in a debugger and then look at the InnerXml property of the secondary data source.&lt;/p&gt;&lt;p&gt;To get an XPathNavigator positioned at the root of any secondary data source, use the DataSources object:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;nbsp;XPathNavigator dataSource = DataSources[&amp;quot;&lt;u&gt;&lt;i&gt;&lt;b&gt;NameOfDataSource&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&lt;i&gt;&lt;u&gt;&lt;b&gt;&lt;/b&gt;&lt;/u&gt;&lt;/i&gt;&amp;quot;].CreateNavigator();&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Then you can use the SelectSingleNode() method on this object to access any value in this data source.&amp;nbsp; In the above case, the XPath would be &amp;quot;/dfs:myFields/dfs:dataFields/d:row/@SquareOut&amp;quot; to get at the SquareOut node. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Reading a Stored Procedure Output parameter</title><link>https://www.infopathdev.com:443/forums/thread/49332.aspx</link><pubDate>Mon, 23 Nov 2009 14:55:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49332</guid><dc:creator>dkaplan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49332.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=49332</wfw:commentRss><description>&lt;p&gt;I want to use the value of the Output Parameter of a stored procedure in an InfoPath data element.&lt;/p&gt;
&lt;p&gt;An example of a stored procedure which produces output parameters is described in &lt;a href="http://www.infopathdev.com/blogs/jimmy/archive/2009/08/01/executing-a-stored-procedure-with-output-parameters.aspx"&gt;http://www.infopathdev.com/blogs/jimmy/archive/2009/08/01/executing-a-stored-procedure-with-output-parameters.aspx&lt;/a&gt;&amp;nbsp;&amp;nbsp; I have run the example and understand the example up to the point of RETREIVING the two output parameters retrieved by the &lt;font color="#a31515"&gt;SELECT @squareOutput AS SquareOut, @halfOutput AS HalfOut statement.&amp;nbsp; &lt;/font&gt;&lt;font color="#000000"&gt;Specifically I do not understand the following quoted from the article:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;Finally, we run the query, and we get back our result, with our requested values:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&amp;lt;dfs:myFields xmlns:dfs=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dfs:dataFields&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;d:row xmlns:d=&amp;quot;http://schemas.microsoft.com/office/infopath/2003/ado/dataFields&amp;quot; &lt;strong&gt;&lt;em&gt;HalfOut=&amp;quot;529&amp;quot; SquareOut=&amp;quot;11&amp;quot;&lt;/em&gt;&lt;/strong&gt;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dfs:dataFields&amp;gt;&lt;br /&gt;&amp;lt;/dfs:myFields&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;/blockquote&gt;
&lt;p&gt;I do not understand how to see the XML structure.&amp;nbsp; More importantly, how do I load either a string or an XpathNavigator object with the HalfOut and SquareOut values?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thank You.&lt;br /&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>