<?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: How to use SQL Server stored procedures in repeating tebles/sections for INSERT's, DELETE's, etc.?</title><link>https://www.infopathdev.com:443/forums/thread/48326.aspx</link><pubDate>Wed, 28 Oct 2009 17:21:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48326</guid><dc:creator>Francis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48326.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=48326</wfw:commentRss><description>&lt;p&gt;Thanks for the references.&amp;nbsp; I took a look at them, but may hold attempting this.&amp;nbsp; We&amp;#39;re getting a C# programmer; so maybe he can help.&amp;nbsp; I&amp;#39;m going to finish up on the rest of the tables that have data that will need to be inserted, etc.&amp;nbsp; At the end of the week, even if I&amp;#39;m not finished, I&amp;#39;ll let the users start to test it.&amp;nbsp; So far I have 4 tables set up and they work well enough (some fine tuning of controls though).&amp;nbsp; I also have 2 secondary data connections to display data.&amp;nbsp; After I get some results back from users, I&amp;#39;ll let you know how it&amp;#39;s going.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;</description></item><item><title>Re: How to use SQL Server stored procedures in repeating tebles/sections for INSERT's, DELETE's, etc.?</title><link>https://www.infopathdev.com:443/forums/thread/48280.aspx</link><pubDate>Tue, 27 Oct 2009 16:04:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48280</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48280.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=48280</wfw:commentRss><description>&lt;p&gt;You can use code and rules, however, rules run before code (in general -- as usual, there is &lt;a href="http://blogs.msdn.com/infopath/archive/2005/06/17/430347.aspx"&gt;a way around this&lt;/a&gt; if you want to get clever). I don&amp;#39;t think that it would work for your scenario, though. If you want a way to cancel the delete, I&amp;#39;d think you&amp;#39;d want to do the whole thing in code. &lt;a href="http://www.switchonthecode.com/tutorials/csharp-dialogs-part-1-messagebox"&gt;Here&amp;#39;s&lt;/a&gt; a link to a little message box tutorial that also includes info on how to use the dialog result.&lt;/p&gt;</description></item><item><title>Re: How to use SQL Server stored procedures in repeating tebles/sections for INSERT's, DELETE's, etc.?</title><link>https://www.infopathdev.com:443/forums/thread/48264.aspx</link><pubDate>Tue, 27 Oct 2009 11:14:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48264</guid><dc:creator>Francis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48264.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=48264</wfw:commentRss><description>&lt;p&gt;Moving the Delete button to the opposite side is a great suggestion.&amp;nbsp; I&amp;#39;m using IP 2007, and it&amp;#39;s being published to a SharePoint site and doesn&amp;#39;t need to be browser compatible.&amp;nbsp; Every employee has MS Office 2007 with InfoPath.&amp;nbsp; Can a script or coding be used alondside rules?&amp;nbsp; Is there any standard script/code that can beused to allow users to cancel the delete?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;After all this, I&amp;#39;m starting to learn C#.&amp;nbsp; Even if I don&amp;#39;t use it that much, my manager will think I&amp;#39;m taking the initiative on this (LOL).&lt;/p&gt;</description></item><item><title>Re: How to use SQL Server stored procedures in repeating tebles/sections for INSERT's, DELETE's, etc.?</title><link>https://www.infopathdev.com:443/forums/thread/48250.aspx</link><pubDate>Mon, 26 Oct 2009 23:59:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48250</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48250.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=48250</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m afraid that &amp;quot;Show a dialog box message&amp;quot; won&amp;#39;t give the user a chance to cancel. That means you&amp;#39;d need to use code for your pop up.... However, what about moving your buttons to opposite sides? So that your delete button is on one side and your update on another? That would cut down on the user error factor...&lt;/p&gt;
&lt;p&gt;If you are going to use code, are you using IP 2003? or 2007? It makes a difference.... Also, does this form need to be browser compatible? We can&amp;#39;t use message boxes in browser forms, unfortunately.&lt;/p&gt;</description></item><item><title>Re: How to use SQL Server stored procedures in repeating tebles/sections for INSERT's, DELETE's, etc.?</title><link>https://www.infopathdev.com:443/forums/thread/48159.aspx</link><pubDate>Thu, 22 Oct 2009 16:14:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48159</guid><dc:creator>Francis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48159.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=48159</wfw:commentRss><description>&lt;p&gt;I apologize for taking so long to reply for your help.&amp;nbsp; We had some big issues on our SQL Servers, and I wasn&amp;#39;t able to work on this.&amp;nbsp; Also, I got sidetracked on other assignments.&lt;/p&gt;
&lt;p&gt;After a few &amp;quot;Gotchas&amp;quot;, I was able to get the buttons for inserting, updating and deleting rows to work -- so a huge THANK YOU!!&amp;nbsp; I even got the update and delete buttons to only show on existing rows of data, and the insert button to only show on the empty row for entering new data.&lt;/p&gt;
&lt;p&gt;The &amp;quot;Gotchas&amp;quot; had me stumped for a while.&amp;nbsp; This form is really a data entry form for 9 tables, and as a reminder, I&amp;#39;m using SQL Server stored procedures for everything data-related, including the drop-down list boxes.&amp;nbsp; After getting it to work on the first table using the main data connection, I started using secondary data connections for the other tables -- thinking that since I was using stored procedures I could get by some of the receiving/submitting aspects of data connections.&amp;nbsp; When I found that I couldn&amp;#39;t insert a new row into a repeating section, I added another repeating section below this just for inserts.&amp;nbsp; This didn&amp;#39;t seem to work either.&lt;/p&gt;
&lt;p&gt;The solution that appears to work so far is to do a &amp;quot;UNION ALL&amp;quot; query in the stored procedure used in the main data connection using all the tables for each part of the query.&amp;nbsp; Some fields are common in all tables, so that wasn&amp;#39;t a problem.&amp;nbsp; But I had to add fields in the query with default values, e.g., 0 AS ExchangeRate, or &amp;#39;&amp;#39; AS ExchangeRateDate.&amp;nbsp; I had some problems when these extra fields were &amp;quot;NULL&amp;quot;, so hence 0 or &amp;#39;&amp;#39; (blank).&amp;nbsp; I also added a new field named &amp;quot;TableType&amp;quot; that I then used as a way to filter the rows.&amp;nbsp; I was then able to create repeating sections using the main data connection for 2 tables as a test and then to filter the data in each section using &amp;quot;TableType&amp;quot;.&lt;/p&gt;
&lt;p&gt;However another issue popped up as I was testing the buttons.&amp;nbsp; I would sometimes accidently hit the delete button when I wanted to hit the update button.&amp;nbsp; I only have rules on the buttons to &amp;quot;Submit using a data connection&amp;quot; but am not using any script or code.&amp;nbsp; Is there a way to have a rule to have a message pop up after clicking the delete button giving the user a chance to reconsider the delete and cancel the delete&amp;nbsp;(as a reminder, I&amp;#39;m a database developer and not a programmer)?&amp;nbsp; I see there are actions for &amp;quot;Show a dialog box message&amp;quot; or expression.&amp;nbsp; Can either of these be used?&amp;nbsp; If script or code is necessary, how difficult is that?&lt;/p&gt;
&lt;p&gt;PS I had previously used the name &amp;quot;aaqqqa&amp;quot;.&amp;nbsp; You have helped me a lot on a couple of other questions I&amp;#39;ve had in the recent past.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to use SQL Server stored procedures in repeating tebles/sections for INSERT's, DELETE's, etc.?</title><link>https://www.infopathdev.com:443/forums/thread/47157.aspx</link><pubDate>Sat, 19 Sep 2009 00:37:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47157</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47157.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=47157</wfw:commentRss><description>&lt;p&gt;Where is your Delete button? If it is not in the repeating table with your rows, it will always get the first value. A simple solution would be to place the button&amp;nbsp;in the table (you can make it look pretty by changing the text to an &amp;#39;X&amp;#39;, for example, coloring it red and removing borders and shading) so that each row has its own Delete button. Then, when you go to set your parameter with the ID from that row, you&amp;#39;ll get the correct value.&lt;/p&gt;</description></item><item><title>How to use SQL Server stored procedures in repeating tebles/sections for INSERT's, DELETE's, etc.?</title><link>https://www.infopathdev.com:443/forums/thread/47102.aspx</link><pubDate>Thu, 17 Sep 2009 15:11:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47102</guid><dc:creator>Francis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47102.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=47102</wfw:commentRss><description>&lt;p&gt;I have a form in which I connect to a SQL Server 2005 database using a SQL Server endpoint as the web service (it&amp;#39;s not a .NET web service).&amp;nbsp; I&amp;#39;m using &lt;/p&gt;
&lt;p&gt;stored procedures with input parameters for SELECT&amp;#39;s, UPDATE&amp;#39;s, INSERT&amp;#39;s and DELETE&amp;#39;s.&amp;nbsp; The stored procedures for the SELECT&amp;#39;s work fine -- I use them in &lt;/p&gt;
&lt;p&gt;drop-down list boxes and repeating tables or repeating sections.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, I&amp;#39;m not able to click on or highlight a row to get the values of fields in that row to use for the input parameters for the UPDATE, INSERT and &lt;/p&gt;
&lt;p&gt;DELETE stored procedures.&amp;nbsp; For example the stored procedure for DELETE&amp;#39;s uses the primary key of that row, but it will only use the primary key of the first &lt;/p&gt;
&lt;p&gt;row in the repeating table/section and delete that row from the database, even if I click on another row (I have a &amp;quot;Delete&amp;quot; button to submit the stored &lt;/p&gt;
&lt;p&gt;procedure).&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I read articles on the current() function and tried this, but it either didn&amp;#39;t like the way I put it in, or still used the primary key from the first row.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Is there something I&amp;#39;m missing, is there another function I could try, or is there something about bringing a resultset into InfoPath using an endpoint &lt;/p&gt;
&lt;p&gt;and/or a stored procedure that is causing the problem?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not a programmer, so is there a way to do this without coding (hence, the endpoint instead of a .NET webservice)?&amp;nbsp; If coding needs to be used, can &lt;/p&gt;
&lt;p&gt;someone supply an example.&lt;/p&gt;</description></item></channel></rss>