<?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: Calling SP in Javascript which accesses a DB View</title><link>https://www.infopathdev.com:443/forums/thread/17259.aspx</link><pubDate>Wed, 05 Apr 2006 15:09:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17259</guid><dc:creator>ek38</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17259.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17259</wfw:commentRss><description>Matt,&lt;br /&gt;&lt;br /&gt;Thanks for the direction.  I did more digging and found other threads that discuss filtering the secondary datasource and we got it to work.&lt;br /&gt;&lt;br /&gt;I'll probably come back to the Stored Procedure at some point, but right now, we are going to just use the Filters.&lt;br /&gt;&lt;br /&gt;Thanks!</description></item><item><title>Re: Calling SP in Javascript which accesses a DB View</title><link>https://www.infopathdev.com:443/forums/thread/17258.aspx</link><pubDate>Wed, 05 Apr 2006 12:24:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17258</guid><dc:creator>ek38</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17258.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17258</wfw:commentRss><description>Matt, Thanks for replying.  I hope you are right that I don't need the SP.  I did read several threads on this site as well as others and couldn't find an answer.&lt;br /&gt;&lt;br /&gt;Anyway, with your suggestion.  Yes, the view coming in already has the data I need.  &lt;b&gt;How do you filter on a secondary datasource?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;There is a username on the form when it opens.  Let's say it is JaneDoe.  I want to put a button on the form that filters the secondary datasource (which is a view) by username JaneDoe thus returning the "Sum" total of all her points.&lt;br /&gt;</description></item><item><title>Re: Calling SP in Javascript which accesses a DB View</title><link>https://www.infopathdev.com:443/forums/thread/17257.aspx</link><pubDate>Wed, 05 Apr 2006 10:27:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17257</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17257.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17257</wfw:commentRss><description>Why do you need to use a stored procedure at all? If you just add the DB view that you talked about that has the sums already computed as a secondary data source then you should be able to filter this list on a name value.  Are you receiving the list of username/sum pairs into InfoPath? If so, then there is no need for a stored procedure.&lt;br /&gt;&lt;br /&gt;If you need to use a stored procedure for some reason that I do not know, there are several posts on this forum about this.  Check out this thread for starters:&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1863&amp;SearchTerms=output&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1863&amp;SearchTerms=output&lt;/a&gt;,parameter</description></item><item><title>Calling SP in Javascript which accesses a DB View</title><link>https://www.infopathdev.com:443/forums/thread/16799.aspx</link><pubDate>Wed, 05 Apr 2006 01:23:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16799</guid><dc:creator>ek38</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16799.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=16799</wfw:commentRss><description>A user is going to click on button and get a "Sum" of points earned from a DB table.  SQL Server, i.e. &lt;br /&gt;&lt;br /&gt;select sum(pointEarned) as TotalPoints from &amp;lt;table x&amp;gt; where username = user name stored on the form.&lt;br /&gt;&lt;br /&gt;I created a "view" that stores the sum's for every username in the db.&lt;br /&gt;&lt;br /&gt;I added the view as a secondary datasource.  all the fields show up in Infopath.&lt;br /&gt;&lt;br /&gt;I created a stored procedure that queries the "View" passing in username as a parameter.&lt;br /&gt;&lt;br /&gt;I have added the fields of the "View" to the form with a "Run Query" button.  Behiind the button I wrote Java script code to call the stored procedure passing the username paremeter.&lt;br /&gt;&lt;br /&gt;I expected the results to populate the datafields for the "View" on the form.&lt;br /&gt;&lt;br /&gt;Nothing happened.&lt;br /&gt;&lt;br /&gt;Is this approach even possible?  Using a SP, to query a "View" that is linked in as a "Secondary" Datasource?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Nothing happens when I run it.&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>