<?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: Switching views with a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/17218.aspx</link><pubDate>Thu, 16 Feb 2006 12:52:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17218</guid><dc:creator>ahardin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17218.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17218</wfw:commentRss><description>Good Job Pete&lt;br /&gt;&lt;br /&gt;I thought that might have been it just had the same problem with queryfields of my own to setup a username and login system to feed back into a projects database and produce reporting, luckily i had to only clear three fields first.&lt;br /&gt;&lt;br /&gt;Cheers Adam&lt;br /&gt;&lt;br /&gt;I'm from WALES&lt;br /&gt;adam.harding@ltsbasset.co.uk</description></item><item><title>Re: Switching views with a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/17217.aspx</link><pubDate>Thu, 16 Feb 2006 12:24:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17217</guid><dc:creator>pcapsey</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17217.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17217</wfw:commentRss><description>Hi Adam,&lt;br /&gt;&lt;br /&gt;I think you might have cracked it! I had the table keyed on a number of fields, which are also the query fields used to select records on the Select view. I've changed the table to use the autonumber as the key, and I use that field to move from the Summary to Detail view. When moving back from the Detail to Summary, I set the autonumber to blank. The Summary then displays the subset of records that was originally displayed. The query fields must still hold the original values entered by the user.&lt;br /&gt;&lt;br /&gt;One thing to note. When I updated the main data connection in the form, I had to change the SQL statement generated by InfoPath to include the autonumber so that I could use the field in the form.&lt;br /&gt;&lt;br /&gt;Thanks for your help,&lt;br /&gt;&lt;br /&gt;Pete&lt;br /&gt;</description></item><item><title>Re: Switching views with a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/17216.aspx</link><pubDate>Thu, 16 Feb 2006 11:32:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17216</guid><dc:creator>ahardin</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17216.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17216</wfw:commentRss><description>Hi pete&lt;br /&gt;&lt;br /&gt;I am over the channel in Wales good to see someone from the UK on here.&lt;br /&gt;&lt;br /&gt;the button that goes from summary to detail need only define one field if you have a unique reference number for that record.  It can query using that and display it in datafields on the detail view.&lt;br /&gt;&lt;br /&gt;Your button on the detail view should clear the reference number queryfield, submit query to database and switch views back to summary view which would still include all records which match back the other criteria.&lt;br /&gt;&lt;br /&gt;I hope this helps&lt;br /&gt;&lt;br /&gt;Cheers Adam&lt;br /&gt;&lt;br /&gt;If you want to talk direct you can get me on adam.harding@ltsbasset.co.uk</description></item><item><title>Re: Switching views with a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/17215.aspx</link><pubDate>Thu, 16 Feb 2006 11:25:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17215</guid><dc:creator>pcapsey</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17215.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17215</wfw:commentRss><description>Hi there,&lt;br /&gt;&lt;br /&gt;Many thanks for the replies. However, I couldn't get my form to work following Matt's example, which I worked through, and I couldn't work out what to do from Agni's reply, as I'm not a coder! Maybe I should give more detail about what I'm trying to do.&lt;br /&gt;&lt;br /&gt;The first view of my form, Select, has a maximum of 7 hierarchical fields that can be entered by the user and then used to access the database table. For example, "Project" is the highest level field. If the user queries the database table using only "Project", all records for the selected project are returned. The next level is "Subproject". If the user queries the database using "Project" and "Subproject", all records for the subproject within the project are returned.&lt;br /&gt;&lt;br /&gt;The records returned from the database are displayed in the second view, Summary, in a repeating table. This shows a snapshot of the records returned from the database, with only certain fields displayed. The user can click a "View" button to show the details of a particular record in the third view, Detail. The button is displayed alongside each record in the table. When the button is clicked, I'm setting the query fields to the values returned for the selected record and requerying the database.&lt;br /&gt;&lt;br /&gt;The third view, Detail, shows the full record. I want a button on this view that allows the user to return to the Summary view showing all of the records that were originally returned. But, because I have changed the values of the query fields when moving from the Summary to Detail view, this currently only displays the record from the Detail view on the Summary view.&lt;br /&gt;&lt;br /&gt;I've tried using the main database table defined as a secondary data connection in both the Summary and Detail views, but it makes no difference because I still need to set the query fields before moving from the Summary to Detail view.&lt;br /&gt;&lt;br /&gt;The main difference between my form and Matt's example is the selection screen. My selection screen allows the user to determine which records to display in the Summary view, whereas Matt's example shows a list of all records in the database table, from which the user selects a record by clicking "View Details".&lt;br /&gt;&lt;br /&gt;I think I need to hold the original values of the query fields, as entered by the user on the Select view, and use them to requery the database when moving from the Detail to Summary view. This is where I'm having problems!&lt;br /&gt;&lt;br /&gt;Any further help would be appreciated.&lt;br /&gt;&lt;br /&gt;Many thanks,&lt;br /&gt;&lt;br /&gt;Pete&lt;br /&gt;</description></item><item><title>Re: Switching views with a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/17214.aspx</link><pubDate>Thu, 16 Feb 2006 02:07:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17214</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17214.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17214</wfw:commentRss><description>I think the easiest way to do this would be to use several data connections to the same database, this way you can have "summary" queries and "detail" queries completely seperate. I did something very similiar to what you are describing in this HowTo:&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://infopathdev.com/howto/tutorials/default.aspx?i=0bb37b4de44348408680a53a449f2353&gt;http://infopathdev.com/howto/tutorials/default.aspx?i=0bb37b4de44348408680a53a449f2353&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Re: Switching views with a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/17213.aspx</link><pubDate>Wed, 15 Feb 2006 21:11:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17213</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17213.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17213</wfw:commentRss><description>Hi Pete Capsey,&lt;br /&gt;Welcome to the Forum!&lt;br /&gt;You can write some code in the OnSwitchView method to query the DB. &lt;br /&gt;You can get a reference to the DB dataconnection, and change command if required and call query method of that adapter.&lt;br /&gt;If you want sample code search the forum for "ADOAdapter".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;INFOPATHdev India</description></item><item><title>Switching views with a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/16784.aspx</link><pubDate>Wed, 15 Feb 2006 08:49:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16784</guid><dc:creator>pcapsey</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16784.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=16784</wfw:commentRss><description>Hi there,&lt;br /&gt;&lt;br /&gt;I'm currently developing an InfoPath form that uses three views. These are:&lt;br /&gt;&lt;br /&gt;Select view - the user enters criteria that are used to select records from an Access database.&lt;br /&gt;Summary view - this view shows summary information for all records that meet the criteria entered by the user in the Select view. The information is displayed in a repeating table.&lt;br /&gt;Detail view - the user clicks a button in a row of the repeating table on the Summary view to display the full record using the Detail view. The button sets the database query fields to the values displayed in the row of the repeating table in order to read the record.&lt;br /&gt;&lt;br /&gt;My problem is this. I want to be able to go back from the Detail view to the Summary view and show all of the records that were originally displayed in the Summary view. I use a button with a rule to Change Views, but the only record displayed in the Summary view is the one that is displayed in the Detail view.&lt;br /&gt;&lt;br /&gt;I think I need to reset the database query fields to the original values entered by the user on the Select view, but cannot find a way to do this. Any help would be greatly appreciated.&lt;br /&gt;&lt;br /&gt;Thanks and regards,&lt;br /&gt;&lt;br /&gt;Pete Capsey</description></item></channel></rss>