<?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>Microsoft Access</title><link>https://www.infopathdev.com:443/forums/141.aspx</link><description>Qdabra is committed to answering InfoPath questions. However, we do not support Microsoft Access. For non-Access questions, please use the other boards.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Survey Development with infopath + Microsoft Access, looking for a way to do this with decent database design</title><link>https://www.infopathdev.com:443/forums/thread/46353.aspx</link><pubDate>Thu, 27 Aug 2009 19:00:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46353</guid><dc:creator>Arguas</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46353.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=141&amp;PostID=46353</wfw:commentRss><description>&lt;p&gt;Hello people of Infopath Dev,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been charged with the task of making a user friendly survey that produces analyzable data.&amp;nbsp; I&amp;#39;m a computer scientist, and as a result I&amp;#39;m not afraid to delve into doing the task I&amp;#39;m about to detail programmatically, if I could just get a straight answer as to how to do it.&lt;/p&gt;
&lt;p&gt;The survey needs to be able to be posted onto or accessed using SharePoint.&amp;nbsp; I have determined I can upload the document, so I will go ahead and skip the Web Service components of Infopath.&amp;nbsp; The survey is intended to gather project sponsor feedback for those who have had projects done through our department.&amp;nbsp; The survey has 8 fields that detail information about who the person is, what the project was, and what the project was for.&amp;nbsp; There are 27 questions in the survey, all of which can be replied to on a scale of 1 to 5 with the exception of a general comments section.&amp;nbsp; The analysis of the survey will count the number of people who responded to the survey in each possible way.&amp;nbsp; For example, the report is intended to analyze how many people answered question 1 with a 1, how many with a 2, how many with a 3, and so on, for a given project.&amp;nbsp; I was asked to do this project using sharepoint because, well, it is easy to make it look pretty; SharePoint&amp;#39;s survey utility looks awful if you can&amp;#39;t adjust any code to be able to provide headers or font changes.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;My first approach was to take each field and use it as a column in Access 2003 in a large table of responses, and try to get the counts and reporting from there.&amp;nbsp; However, the restrictions of queries in Access make it very difficult to figure out the count results from each of the question and generate a new table based upon those results, and also, since they are columns, I can&amp;#39;t make a generic function to easily loop through a given column to get counts of a particular response.&amp;nbsp; In general, we figure that the raw data can be thrown into an Excel data and some manual analysis will suffice for now.&lt;/p&gt;
&lt;p&gt;But honestly, I find this to be a very ugly way to do it.&amp;nbsp; My boss shouldn&amp;#39;t need to do something manual like that, since a database&amp;#39;s purpose is to be able to not only store data, but also to be able to run queries robust enough to generate that data for her.&amp;nbsp; So I looked at a database design that would make this easier: Make a table populated when information is entered via infopath.&amp;nbsp; Ideally, the columns would be the possible responses, and each row would be a response to a given question, making queries much easier and having the counting algorithm just be a summation.&lt;/p&gt;
&lt;p&gt;However, InfoPath 2003 makes this very difficult.&amp;nbsp; Each field can only have one data source, and it appears that I can&amp;#39;t have a repeating section predefined more than once, even if the only thing changing is the question name and the description of what the question is.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;So, after having explained what the goal is, my question is this: How do I programmatically submit multiple rows into an Access database through Infopath with the same data source target?&amp;nbsp; The XDocument.submit appears to send all data currently present on the form to their various sources, which is not what I want if multiple fields are pointing to the same datasource.&amp;nbsp; Really, all I want to do is to generate an SQL query that does a multiple insertion into a table that I have some control over.&amp;nbsp; To visually illustrate, this is what I&amp;#39;m looking for on the Infopath form:&lt;/p&gt;
&lt;p&gt;PM1: I was suitably involved in the planning/estimating aspects of the project.&amp;nbsp; (Drop down with responses 1, 2, 3, 4, 5) generates the row PM1, a 1 in the appropriate response column, and a 0 in all of the others.&lt;/p&gt;
&lt;p&gt;PM2: I understood thoroughly what was expected of me. (Drop down with responses 1, 2, 3, 4, 5) generates the row PM2, a 1 in the appropriate response column, and a 0 in all of the others.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;... and so on, for all 27 questions.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Is there any way for me to do this at all in Infopath, or must I stick to the nasty solution of throwing every response into the same table in the database?&lt;/p&gt;
&lt;p&gt;Thank you for reading my long post, and in advance for your response.&lt;/p&gt;
&lt;p&gt;~Ryan Walters.&lt;/p&gt;</description></item></channel></rss>