<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx</link><description>If you've ever designed and deployed a form that will be frequently used or require significant data analysis, you have probably looked into maintaining data in a SQL database . With InfoPath 2003 and the InfoPath 2007 rich client, you get what you expect.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>InfoPath 2007 - submiting to SQL Server via Web Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#1607323</link><pubDate>Tue, 06 Feb 2007 02:55:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1607323</guid><dc:creator>VB-tech weblog</dc:creator><description /></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#1613602</link><pubDate>Tue, 06 Feb 2007 23:01:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1613602</guid><dc:creator>helloitsliam</dc:creator><description>&lt;p&gt;Loving this post. Keep up the good work!! :-)&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#1614071</link><pubDate>Wed, 07 Feb 2007 00:45:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1614071</guid><dc:creator>rgardner</dc:creator><description>&lt;p&gt;Great post. &amp;nbsp;Everything works great in the InfoPath client, but not from Forms Services. &amp;nbsp;The form is full trust and is an administrative form. &amp;nbsp;Both of the data connections are UDC files and I enabled cross-domain data access. &amp;nbsp;The query works great. &amp;nbsp;The submit is giving me errors. &amp;nbsp;Any ideas? &amp;nbsp;Here is what I see in the SharePoint logs:&lt;/p&gt;
&lt;p&gt;Unhandled exception when rendering form on postback System.IndexOutOfRangeException: Index was outside the bounds of the array. &amp;nbsp; &amp;nbsp; at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.HandleSubmitDataSetInput(XPathNavigator inputSubDOM, Boolean[] useDataSets, XmlDocument soapRequest, Solution solution, String name) &amp;nbsp; &amp;nbsp; at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.PrepareSoapRequest(XPathNavigator inputSubDOM, Boolean[] inputUseDataset, Solution solution, String name, Boolean useSelf) &amp;nbsp; &amp;nbsp; at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.ExecWebRequestSync(XPathNavigator inputSubDOM, Boolean[] inputUseDataset, XPathNavigator resultsSubDOM, Boolean resultUseDataset, XPathNavigator errorsSubDOM, Uri serviceUrl, Uri soapAction, Int...	&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#1637796</link><pubDate>Sat, 10 Feb 2007 01:39:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1637796</guid><dc:creator>forrestd</dc:creator><description>&lt;p&gt;Thanks for your response! &amp;nbsp;I'm glad to see someone's trying this out!&lt;/p&gt;
&lt;p&gt;Anyway, as for the error you see on postback, I couldn't reproduce it with a simple test, so it looks like there's something about your DataSet that the Forms Server doesn't like. &amp;nbsp;It's possible this has to do with the values you entered into the dataFields, but I'd have to see your source files to diagnose it and see if I could replicate it locally. &amp;nbsp;On your side, I'd try tweaking the data types of the database column (and modifying the corresponding web service code) to find out if serialization is working correctly.&lt;/p&gt;
&lt;p&gt;I'd love to investigate your failure. &amp;nbsp;It would be great if you could send me:&lt;/p&gt;
&lt;p&gt;1. A copy of your form template&lt;/p&gt;
&lt;p&gt;2. Your web service code&lt;/p&gt;
&lt;p&gt;3. The asmx file&lt;/p&gt;
&lt;p&gt;4. The 2 sql scripts you used to create your DB table and the DML trigger&lt;/p&gt;
&lt;p&gt;5. Version/SKU information about your Forms Services installation&lt;/p&gt;
&lt;p&gt;6. A description of the data you entered into the form template prior to submitting&lt;/p&gt;
&lt;p&gt;7. Any other environment-specific detail you think is relevant.&lt;/p&gt;
&lt;p&gt;My (clumsily encoded) e-mail is “For[DELETEME – fighting spam]rest[dot]dilla[DELETEME – fighting spam]way [AT] MICROSOFT [DOT] COM”&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#1810404</link><pubDate>Mon, 05 Mar 2007 18:26:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1810404</guid><dc:creator>JSeeders</dc:creator><description>&lt;p&gt;I am having trouble getting VS 2005 to publish the site. &amp;nbsp;I keep getting the error &amp;quot;js-forms-webservice:8080/&amp;quot; is not a valid virtual path. &amp;nbsp;After initially setting the port number to 8080 that path should connect to the IPFSDiffGram directory under wwwroot. &amp;nbsp;I assume VS connected sucessfully to it when creating the new project.&lt;/p&gt;
&lt;p&gt;I did a little research and found a similar issue noting a VS bug prior to SP1 so I have now updated to SP1 but am still getting the error. &amp;nbsp;Any ideas?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#1868131</link><pubDate>Tue, 13 Mar 2007 02:02:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1868131</guid><dc:creator>forrestd</dc:creator><description>&lt;p&gt;I'm not sure how to reproduce the error you're seeing, but could you elaborate on the steps you're following?&lt;/p&gt;
&lt;p&gt;Following these steps, I don't see any failures:&lt;/p&gt;
&lt;p&gt;1. Create the web site in IIS, with local path set to &amp;quot;C:\Inetpub\wwwroot\IPFSDiffGram&amp;quot; and port 4712.&lt;/p&gt;
&lt;p&gt;2. Create a separate app pool for the web site.&lt;/p&gt;
&lt;p&gt;3. Launch VS and create a new web site on local IIS under the site you just created.&lt;/p&gt;
&lt;p&gt;4. Add the cs and asmx files.&lt;/p&gt;
&lt;p&gt;5. Build the project.&lt;/p&gt;
&lt;p&gt;At this point, I can access the web service via the URL: &lt;a rel="nofollow" target="_new" href="http://localhost:4712/DiffgramService.asmx"&gt;http://localhost:4712/DiffgramService.asmx&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Are you seeing different results in following those steps? &amp;nbsp;&amp;quot;Publishing&amp;quot; the web site isn't strictly necessary when you're designing the web site on your local server.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Forrest&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#1951516</link><pubDate>Mon, 26 Mar 2007 14:07:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1951516</guid><dc:creator>Shuwi</dc:creator><description>&lt;p&gt;Great post, great blog !&lt;/p&gt;
&lt;p&gt;Finally some good / useful information about InfoPath!! :)&lt;/p&gt;
&lt;p&gt;I'm running the sample (in exact the same configuration as the sample; same db names etc). &lt;/p&gt;
&lt;p&gt;But I keep getting 'The exeption: The select command string must start with the 'SELECT' keyword!&lt;/p&gt;
&lt;p&gt;I've added the selectCommandString to the exeption string so I can see what the commandString actualy is.. and that is: empty.. &lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;throw new Exception(&amp;quot;The, &amp;quot; + selectCommandString + &amp;quot;, select &lt;/p&gt;
&lt;p&gt;-- &lt;/p&gt;
&lt;p&gt;I've looked in the code where the selectCommandString is beeing filled.. but I can's seem to find it ...!&lt;/p&gt;
&lt;p&gt;Thanks in advance!!&lt;/p&gt;
&lt;p&gt;Shuwi&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#2271654</link><pubDate>Wed, 25 Apr 2007 15:46:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2271654</guid><dc:creator>cterry</dc:creator><description>&lt;p&gt;Great - I'm almost there, but getting the same error as rgardner i.e. Index out of bounds when submitting via a browser. Works fine in rich-client!&lt;/p&gt;
&lt;p&gt;I have copied exactly what you had i.e. same db, table, username, password (although I had to change your code which had the columns called data1 etc - changed them to Column1 etc).&lt;/p&gt;
&lt;p&gt;I'm guessing it's some configuration issue with SharePoint server. Any ideas?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Colin&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#2386017</link><pubDate>Thu, 03 May 2007 06:46:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2386017</guid><dc:creator>Terry G Phillips</dc:creator><description>&lt;p&gt;Thank you for the great info.&lt;/p&gt;
&lt;p&gt;If the submit process is an SQL insert, is there a way to return the ID column from the insert procedure and place it in a field on the form?&lt;/p&gt;
&lt;p&gt;TIA,&lt;/p&gt;
&lt;p&gt;Terry&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#2552764</link><pubDate>Fri, 11 May 2007 23:45:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2552764</guid><dc:creator>forrestd</dc:creator><description>&lt;p&gt;After long absence...&lt;/p&gt;
&lt;p&gt;Shuwi, it looks like you're using the &amp;quot;DBDataDynamic&amp;quot; WebMethod. &amp;nbsp;This was my best attempt on short notice to provide a scalable WebMethod that could accept an arbitrary connection string and command, and then query and submit valid recordsets to the database table. &amp;nbsp;However, for most purposes, it's a lot easier to just use the &amp;quot;DBData&amp;quot; WebMethod, which takes a static number of query parameters corresponding to fixed columns in your DB table. &amp;nbsp;Try that one before you dive too deeply...&lt;/p&gt;
&lt;p&gt;Cterry and Rgardner, we've achieved an internal repro environment for the IndexOutOfRangeException, so we'll take a look and see what we can find out. &amp;nbsp;For now, I don't have any further info.&lt;/p&gt;
&lt;p&gt;Terry G Phillips, you can get the updated ID by simply executing the query data connection, constraining the recordset by passing queryFields that will return the record you're looking for. &amp;nbsp;Then you copy the ID value, using Rules or custom code in your form template, to move it to a target field.&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#2552862</link><pubDate>Fri, 11 May 2007 23:52:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2552862</guid><dc:creator>forrestd</dc:creator><description>&lt;p&gt;Oh, and Shuwi, the strings passed to the web service are populated with the values of the &amp;quot;dfs:queryFields&amp;quot; xml nodes in your form template. &amp;nbsp;It's a good idea, when using the dynamic WebMethod, to set a default value for the queryFields to specify the connection string, command, etc.&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#2553424</link><pubDate>Sat, 12 May 2007 00:29:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2553424</guid><dc:creator>forrestd</dc:creator><description>&lt;p&gt;Okay, Cterry and Rgardner, I think we've narrowed down the issue on our side. &amp;nbsp;Shuwi, this affects you as well.&lt;/p&gt;
&lt;p&gt;SHORT ANSWER:&lt;/p&gt;
&lt;p&gt;Map all submit parameters, not just the DataSet:&lt;/p&gt;
&lt;p&gt;Revisit step 15 for designing your submit data connection: &amp;nbsp;If your web service takes parameters to constrain the select command, map these parameters to the queryFields generated during the creation of the query connection. &lt;/p&gt;
&lt;p&gt;LONG ANSWER:&lt;/p&gt;
&lt;p&gt;In the screenshot of the submit data connection parameter mapping page in the data connection wizard, I only show the DataSet parameter for the web service. &amp;nbsp;That screenshot is actually out of date relative to the source for the web service.&lt;/p&gt;
&lt;p&gt;In the attached files, you'll see that the &amp;quot;UpdateDBData&amp;quot; WebMethod actually takes query parameters, in addition to the data being submitted. &amp;nbsp;This is to allow the web service to restrict the result set, being queried and successively submitted, to a subset of the data in the table.&lt;/p&gt;
&lt;p&gt;Now, practically, that means you'll actually see &amp;quot;Column1&amp;quot;, ..., &amp;quot;Column5&amp;quot; in the data connection wizard. &amp;nbsp;For browser-enabled form templates rendered in the browser, you must map the other (non-dataset) parameters to their corresponding queryFields. &amp;nbsp;The rich client can handle it if you don't map the parameters, and empty strings are sent in place of the queryFields values. &amp;nbsp;IPFS, on the other hand, requires that the mappings be defined.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Forrest&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#2941956</link><pubDate>Mon, 28 May 2007 13:08:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2941956</guid><dc:creator>xjmmn</dc:creator><description>&lt;p&gt;Great post. &amp;nbsp;Everything works well!&lt;/p&gt;
&lt;p&gt;spent a lot of time:)&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#3094513</link><pubDate>Tue, 05 Jun 2007 12:15:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3094513</guid><dc:creator>xjmmn</dc:creator><description>&lt;p&gt;I receive an error message when I change the data type with int.&lt;/p&gt;
&lt;p&gt;error :&amp;quot;The form can not be submitted because it contains validation errors. Errors are marked with either a red asterisk required fields or a red dashed border(invalid values) &amp;quot;&lt;/p&gt;
&lt;p&gt;Fiedld or group :tns supplier_id&lt;/p&gt;
&lt;p&gt;error: only integers allowed.&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#3664971</link><pubDate>Tue, 03 Jul 2007 02:01:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3664971</guid><dc:creator>forrestd</dc:creator><description>&lt;p&gt;Excellent responses, everyone!&lt;/p&gt;
&lt;p&gt;1. xjmmn, string fields in InfoPath do not, by default, require a non-empty value. &amp;nbsp;When you change the data type to int, you'll need to guarantee that the fields contain an integer value. &amp;nbsp;Otherwise, you'll see the data validation errors at submit time.&lt;/p&gt;
&lt;p&gt;2. Bjoern Thomsen and Paresh also pointed out another corner case that needs to be addressed: &amp;nbsp;After step 2.6, you need to set the default &amp;quot;Choice&amp;quot; for the DataSet to use the &amp;quot;Time&amp;quot; table. &amp;nbsp;Follow these steps:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;a. &amp;nbsp;In the InfoPath Designer, click &amp;quot;Tools&amp;quot; &amp;gt;&amp;gt; &amp;quot;Default Values...&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;b. &amp;nbsp;Expand the nodes until you see the &amp;quot;DBTable&amp;quot; and &amp;quot;Time&amp;quot; group nodes under the repeating &amp;quot;(Choice)&amp;quot; node.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;c. &amp;nbsp;Select the &amp;quot;Time&amp;quot; radio button to include the timestamp in the form by default.&lt;/p&gt;
&lt;p&gt;NOTE: &amp;nbsp;After fixing your form template as above, you'll have to replace line 897 in &amp;quot;DiffGramService.cs&amp;quot; with the following code:&lt;/p&gt;
&lt;p&gt;object maxPrimaryKeyObject = dbPrimaryKeyValuesReader.GetValue(0);&lt;/p&gt;
&lt;p&gt;if (maxPrimaryKeyObject is System.DBNull)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;	// No primary key values exist in the table. &amp;nbsp;This must mean that there are no records in&lt;/p&gt;
&lt;p&gt;	// the table. &amp;nbsp;Therefore, we can safely assume this submit operation will create the first&lt;/p&gt;
&lt;p&gt;	// primary key in the table.&lt;/p&gt;
&lt;p&gt;	maxKey = 0;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;else&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;	maxKey = (int)maxPrimaryKeyObject;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Thanks again!&lt;/p&gt;
&lt;p&gt;Forrest&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#3969715</link><pubDate>Fri, 20 Jul 2007 08:28:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3969715</guid><dc:creator>Kayday</dc:creator><description>&lt;p&gt;Hi Forrest,&lt;/p&gt;
&lt;p&gt;Can you give me some guidance on how to do this for multiple tables that have parent-child relationship please?? &amp;nbsp;Also, what if my table does not contain LastTimeStamp, how would I check if the data were changed? &amp;nbsp;Where should the modifications be? I'm not really good at C# .... :( &lt;/p&gt;
&lt;p&gt;Thanks a lot for any help.&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#4011819</link><pubDate>Mon, 23 Jul 2007 20:01:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4011819</guid><dc:creator>forrestd</dc:creator><description>&lt;p&gt;Hi Kayday,&lt;/p&gt;
&lt;p&gt;I don't have a code sample to offer, so I'll just throw out some ideas for logic you might follow to accommodate child tables. &amp;nbsp;There is a lot of room for personal preference when determining how tables should interact, but I'll offer a very simple way.&lt;/p&gt;
&lt;p&gt;For the sample code I provided, I assume that you've setup your table with a surrogate primary key. &amp;nbsp;Now, assuming that you link your child table to your parent table, you would probably modify my merging code to do something like this (I'll treat the specific case of 1 parent, 1 child):&lt;/p&gt;
&lt;p&gt;1. &amp;nbsp;Query the latest DataSet from the parent table.&lt;/p&gt;
&lt;p&gt;2. &amp;nbsp;Loop through the parent DataSet using the logic provided in the code sample to flag inserts/updates/deletes.&lt;/p&gt;
&lt;p&gt;3. &amp;nbsp;In the loop body, after you've flagged the change for the current record in the parent's DataSet; query the child table, constraining the query to return only those records in the child table that match the parent record's surrogate key.&lt;/p&gt;
&lt;p&gt;4. &amp;nbsp;Loop through the resultant child table recordset and diff the child DataSet rows against those queried from the DB (using the same logic provided in the original code sample.)&lt;/p&gt;
&lt;p&gt;So the pseudo-code would look something like this:&lt;/p&gt;
&lt;p&gt;Query Parent table&lt;/p&gt;
&lt;p&gt;Loop through parent table recordset to compare against submitted parent DataSet&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Mark the current parent record as insert/update/delete&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Query child table records that correspond to the current parent records surrogate primary key value.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; Loop through child table recordset to compare against submitted child DataSet&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mark the current child record as insert/update/delete&lt;/p&gt;
&lt;p&gt; &amp;nbsp; End loop&lt;/p&gt;
&lt;p&gt;End Loop&lt;/p&gt;
&lt;p&gt;That pseudo-code lends itself to recursing through multiple levels of a parent-child hierarchy.&lt;/p&gt;
&lt;p&gt;You'll need to decide whether records in the child table should be deleted whenever the corresponding record in the parent table is deleted. &amp;nbsp;In other words, is the parent-child relationship a true foreign-key relationship, or is the relationship purely virtual, for the purpose of convenience?&lt;/p&gt;
&lt;p&gt;Hope that helps!&lt;/p&gt;
&lt;p&gt;Thanks, Forrest&lt;/p&gt;
</description></item><item><title>walmart back to school supplies</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#4854064</link><pubDate>Mon, 10 Sep 2007 19:02:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4854064</guid><dc:creator>walmart back to school supplies</dc:creator><description>&lt;p&gt;walmart back to school supplies&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#4866662</link><pubDate>Tue, 11 Sep 2007 18:03:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4866662</guid><dc:creator>alex350r</dc:creator><description>&lt;p&gt;Great Post!&lt;/p&gt;
&lt;p&gt;Im having a problem though:&lt;/p&gt;
&lt;p&gt;Ive managed to configure the Web Service for my Database.&lt;/p&gt;
&lt;p&gt;When i create the infopath form i can only put the 'data' controls from the dbdataset into a 'repeating' section.&lt;/p&gt;
&lt;p&gt;The form i wish to design should just have one set of fields (non repeating) that submit to a database.&lt;/p&gt;
&lt;p&gt;How can i change this?&lt;/p&gt;
&lt;p&gt;Thanks, Alex&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#5002278</link><pubDate>Thu, 20 Sep 2007 02:07:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5002278</guid><dc:creator>mkoslof</dc:creator><description>&lt;p&gt;I'm sorry to cross post, and I mentioned this in another blog entry. &amp;nbsp;I am using SQL Server Native XML Web Services to act as a secondary datasource to InfoPath. &amp;nbsp;While this works great in the InfoPath rich client, it fails in InfoPath Forms Services and everything I have tried has led me no closer to a solution.&lt;/p&gt;
&lt;p&gt;I am puzzled by this and I'm not sure why this is a problem, is this not just SOAP and standard wsdl at play here.&lt;/p&gt;
&lt;p&gt;At this point, I am actually looking for a easy answer :). &amp;nbsp;Meaning, does anyone know if this is even possible through InfoPath Form Services? &amp;nbsp;Or is this a current limitation? &amp;nbsp;I have done tons with Web Services before and I've never had an issue like this.&lt;/p&gt;
&lt;p&gt;If the answer is, no, its not possible, are there any alternatives, besides writing my own web service to feed into InfoPath. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please note at this point, just confirmation (either way, yes its possible, no its not supported) would be very helpful. &amp;nbsp;Thanks again&lt;/p&gt;
&lt;p&gt;MK&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#6464001</link><pubDate>Thu, 22 Nov 2007 06:54:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6464001</guid><dc:creator>Matt Faus</dc:creator><description>&lt;p&gt;Hey guys,&lt;/p&gt;
&lt;p&gt;This is a cool example! &amp;nbsp;Writing a web service to submit data to the SQL backend is a great idea, and that's why we created our Database Accelerator product. &amp;nbsp;All you have to do is install it once, and then create a mapping from XML to SQL for each of the new form templates that you create. &amp;nbsp;This is a much better model than creating a new custom web service with every new form template. &amp;nbsp;We have used it on some very large projects, and it works great.&lt;/p&gt;
&lt;p&gt;Take a look here: &lt;a rel="nofollow" target="_new" href="http://www.qdabra.com/proddetail.asp?prod=QDBXL1"&gt;http://www.qdabra.com/proddetail.asp?prod=QDBXL1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you have any questions, drop us a line in the Contact Us page! I hope this makes your developments easier!&lt;/p&gt;
&lt;p&gt;Matt Faus&lt;/p&gt;
&lt;p&gt;Qdabra Software&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#8750831</link><pubDate>Fri, 18 Jul 2008 22:02:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8750831</guid><dc:creator>Johnk</dc:creator><description>&lt;p&gt;Ok, I know how far behind I am and how new I am to development based on the age of the blogs I use to solve my issues. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have set up MOSS 2007 Enterprise on Windows Server 2003 with SQL 2005 Advanced as the Database &amp;nbsp;for the whole shebang. &amp;nbsp;All is good. &amp;nbsp;I discovered Infopath and have written a form that works fine with the infopath client: on to submitting via web services through a browser enabled form ( no infopath client. ) In order to get the concept, I created a local database called test with your SQL scripts, populated a few rows and with Visual Studio 8 set up the web service, compiled it ( no changes ) and set off to design a test form. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I got to step 10 ( my url &lt;a rel="nofollow" target="_new" href="http://infincomd30/infopathwebservice/infopathwebservice.asmx?WSDL"&gt;http://infincomd30/infopathwebservice/infopathwebservice.asmx?WSDL&lt;/a&gt; came up fine (I changed IPFSDiffGram to infopathwebservice throughout the webservice ) and gave me the 4 operation choices. &amp;nbsp;When I pick the DBData operation and click next, I get the 5 parameters tns:data1 - 5, but when I poulate them I get the following SOAP error &amp;quot;unable to create a schema ... &lt;/p&gt;
&lt;p&gt;The SOAP response indicates that an error occurred on the server:&lt;/p&gt;
&lt;p&gt;System.Web.Services.Protocols.SoapException: Server was unable to process request. ---&amp;gt; System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. &amp;nbsp;When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.SqlClient.SqlConnection.Open()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at infopathwebservice.GetDBData(Object[] queryParameters, SqlDbType[] parameterTypes)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at infopathwebservice.DBData(String data1, String data2, String data3, String data4, String data5)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; --- End of inner exception stack trace ---&lt;/p&gt;
&lt;p&gt;My limited experience fails me on customizing the Instance Variables and the Webmethod query parameters ( which i did not do hoping that I was ok with supplied code just the test database ). I am familiar with connection strings etc.&lt;/p&gt;
&lt;p&gt;Could you please give me an example of declaring and/or using the Instance variables and Webmethod query parameters? &amp;nbsp;Thanks, John Koether&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#9399209</link><pubDate>Thu, 05 Feb 2009 20:29:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9399209</guid><dc:creator>Gandalf</dc:creator><description>&lt;p&gt;Hy, great exemple !!&lt;/p&gt;
&lt;p&gt;But I have a problem, i lauch my template InfoPath in my web browser (Internet Explorer) , the sumit data to my database SQL Server generata this message :&lt;/p&gt;
&lt;p&gt;&amp;quot;L'index se trouve en dehors des limites du tableau. &lt;/p&gt;
&lt;p&gt;System.IndexOutOfRangeException: L'index se trouve en dehors des limites du tableau. &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.HandleSubmitDataSetInput(XPathNavigator inputSubDOM, Boolean[] useDataSets, XmlDocument soapRequest, Solution solution, String name) &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.PrepareSoapRequest(XPathNavigator inputSubDOM, Boolean[] inputUseDataset, Solution solution, String name, Boolean useSelf) &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.ExecWebRequestSync(XPathNavigator inputSubDOM, Boolean[] inputUseDataset, XPathNavigator resultsSubDOM, Boolean resultUseDataset, XPathNavigator errorsSubDOM, Uri serviceUrl, Uri soapAction, Int64 timeOutMillisec, Solution solution, Document document, String name, Boolean isQuery, DataAdapterTimer dataAdapterTimer, DataAdapterCredentials credentials, Boolean useDcl, Boolean useProxy, Boolean useSelf) &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterWebServiceSubmit.Execute(Document document, Uri soapAction, Uri serviceUrl, XPathNavigator querySubDOM, XPathNavigator resultsSubDOM, XPathNavigator errorsSubDOM, Int64 timeout, DataAdapterCredentials credentials, Boolean useDcl, Boolean useProxy, Boolean useSelf) &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapterWebServiceSubmit.ExecuteInternal(XPathNavigator queryFields, XPathNavigator resultFields, XPathNavigator errors) &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapterWebServiceSubmit.Execute() &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.SolutionLifetime.RuleAction.EvaluateExpression(Document document, XPathNavigator currentTarget) &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.SolutionLifetime.RulesRuleSet.&amp;lt;&amp;gt;c__DisplayClass7.&amp;lt;EvaluateExpression&amp;gt;b__4() &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.SolutionLifetime.RulesRuleSet.EvaluateExpression(Document document, XPathNavigator targetNavigator) &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonFormCode.&amp;lt;&amp;gt;c__DisplayClass2.&amp;lt;Click&amp;gt;b__0() &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonFormCode.Click(Document document, XPathNavigator container) &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.DocumentLifetime.EventClick.Play(Document document, BindingServices bindingServices, EventLogProcessor eventLogProcessor) &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.DocumentLifetime.Event.PlayEvent(Document document, BindingServices bindingServices, EventLogProcessor eventLogProcessor) &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.DocumentLifetime.EventLogProcessor.&amp;lt;&amp;gt;c__DisplayClass1.&amp;lt;ExecuteLog&amp;gt;b__0() &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.DocumentLifetime.EventLogProcessor.ExecuteLog(Int32 expectedEventLogID) &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.&amp;lt;&amp;gt;c__DisplayClass6.&amp;lt;PlayEventLog&amp;gt;b__3() &lt;/p&gt;
&lt;p&gt;&amp;#224; Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)&amp;quot;&lt;/p&gt;
&lt;p&gt;I hope you can help my...&lt;/p&gt;
&lt;p&gt;Friendly, &lt;/p&gt;
&lt;p&gt;Gandalf&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#9400054</link><pubDate>Fri, 06 Feb 2009 01:43:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9400054</guid><dc:creator>infopath</dc:creator><description>&lt;p&gt;Hi Gandalf,&lt;/p&gt;
&lt;p&gt;A question: are there currently any records in your SQL Server table? If not - for testing purposes please add a record to the table, test again and let us know if that worked or you still received the error.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Scott&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#9401578</link><pubDate>Fri, 06 Feb 2009 12:23:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9401578</guid><dc:creator>Gandalf</dc:creator><description>&lt;p&gt;Thanks Scott for your answer !&lt;/p&gt;
&lt;p&gt;Yes i have 3 record in my sql table.&lt;/p&gt;
&lt;p&gt;When i use the receive methode, the 3 records appears.&lt;/p&gt;
&lt;p&gt;I have drop en recreate my table, but i have always the errors message.&lt;/p&gt;
&lt;p&gt;(Just a another question, with this example, is it possible to write directly in my table ?)&lt;/p&gt;
&lt;p&gt;Have a nice day,&lt;/p&gt;
&lt;p&gt;Gandalf&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#9412894</link><pubDate>Wed, 11 Feb 2009 18:38:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9412894</guid><dc:creator>infopath</dc:creator><description>&lt;p&gt;Hi Gandalf,&lt;/p&gt;
&lt;p&gt;Sorry for the delay...&lt;/p&gt;
&lt;p&gt;By chance, have you walked through creating this process using the *exact* steps/samples/files, etc. in this blog post? Do these steps work for you?&lt;/p&gt;
&lt;p&gt;In regard to your other question of writing directly to your table, I am not sure I understand the question.&lt;/p&gt;
&lt;p&gt;Scott&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#9443651</link><pubDate>Wed, 25 Feb 2009 09:41:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9443651</guid><dc:creator>fencehead2</dc:creator><description>&lt;p&gt;Hi Guys,&lt;/p&gt;
&lt;p&gt;Great example. &lt;/p&gt;
&lt;p&gt;I have followed through your instructions closely however when I reach step 6 InfoPath throws an error message &amp;quot;cannot use the web service because the method does not provide valid XML data&amp;quot;. I am using the method UpdateDBData. &lt;/p&gt;
&lt;p&gt;I have made all the appropriate changes in the .cs file and if I build the solution in VS2005 it does run so I don’t think it’s an issue with the code. Also the database is created and the DML trigger is working. &lt;/p&gt;
&lt;p&gt;So everything seems to be in place for this example to work, just InfoPath seems to think it is not receiving valid XML.&lt;/p&gt;
&lt;p&gt;It would be cool if you could shed some light on this for me.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Matt.&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#9462768</link><pubDate>Fri, 06 Mar 2009 17:51:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9462768</guid><dc:creator>Gandalf</dc:creator><description>&lt;p&gt;Hy,&lt;/p&gt;
&lt;p&gt;Infopath thanks for your anwser, but i have resolve this probleme.&lt;/p&gt;
&lt;p&gt;But, i have another probleme, in the exemple it is just nvarchar in table type. And in my utilisation i have float and int in table type.&lt;/p&gt;
&lt;p&gt;View my code with int :&lt;/p&gt;
&lt;p&gt;[WebMethod(Description = &amp;quot;Retrieve a DataSet containing timestamped data from a hard-coded database and table.&amp;quot;, MessageName = &amp;quot;DBData-Static&amp;quot;)]&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public DataSet DBData(string DESCRIPTION, Int32 CODE_CATEGORIE1, Int32 LIVRE1, Int32 PAPETERIE1, Int32 JEU1)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create an array to contain the parameters. &amp;nbsp;These should include all the arguments for this WebMethod.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;object[] parameters = new object[] { DESCRIPTION, CODE_CATEGORIE1, LIVRE1, PAPETERIE1, JEU1 };&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create an array to indicate the SqlDbTypes of the columns for which the parameter values are specified.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // parameterTypes[i] is the SqlDbType of the database column whose parameter value is specified by parameters[i]&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SqlDbType[] parameterTypes = new SqlDbType[] { SqlDbType.NVarChar, SqlDbType.Int, SqlDbType.Int, SqlDbType.Int, SqlDbType.Int };&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Get the DataSet from the database.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return GetDBData(parameters, parameterTypes);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;View my error message :&lt;/p&gt;
&lt;p&gt;La r&amp;#233;ponse SOAP indique une erreur :&lt;/p&gt;
&lt;p&gt;System.Web.Services.Protocols.SoapException: Le serveur n'a pas pu lire la demande. ---&amp;gt; System.InvalidOperationException: Il existe une erreur dans le document XML (1, 445). ---&amp;gt; System.FormatException: Le format de la cha&amp;#238;ne d'entr&amp;#233;e est incorrect.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#224; System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp;amp; number, NumberFormatInfo info, Boolean parseDecimal)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#224; System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#224; System.Xml.XmlConvert.ToInt32(String s)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#224; Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read3_DBDataStatic()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#224; Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer4.Deserialize(XmlSerializationReader reader)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#224; System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; --- Fin de la trace de la pile d'exception interne ---&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#224; System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#224; System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#224; System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; --- Fin de la trace de la pile d'exception interne ---&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#224; System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#224; System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()&lt;/p&gt;
&lt;p&gt;Je pense que c’est un probl&amp;#232;me de typage des donn&amp;#233;es.&lt;/p&gt;
&lt;p&gt;Le matching entre le type base de donn&amp;#233;es et type .NET doit pas &amp;#234;tre correct.&lt;/p&gt;
&lt;p&gt;I have see in this page the type .net to Sqldbtype&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/fr-fr/library/system.data.sqldbtype"&gt;http://msdn.microsoft.com/fr-fr/library/system.data.sqldbtype&lt;/a&gt;(VS.80).aspx&lt;/p&gt;
&lt;p&gt;I think it is a error in my type, are you any idea please ?&lt;/p&gt;
&lt;p&gt;Have a nice day,&lt;/p&gt;
&lt;p&gt;Gandalf&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#9565603</link><pubDate>Fri, 24 Apr 2009 01:25:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9565603</guid><dc:creator>Rick315</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I've tried this and I get to the point where I try to open the form in the InfoPath rich client. &amp;nbsp;I get the following error when trying to do so:&lt;/p&gt;
&lt;p&gt;The SOAP response indicates that an error occurred on the server:&lt;/p&gt;
&lt;p&gt;System.Web.Services.Protocols.SoapException: Server was unable to process request. ---&amp;gt; System.IndexOutOfRangeException: There is no row at position 0.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.RBTree`1.get_Item(Int32 index)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at System.Data.DataRowCollection.get_Item(Int32 index)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at DiffgramService.MergeAndUpdateDBData(DataSet updatedDBDataSet, Object[] queryParameters, SqlDbType[] parameterTypes) in c:\Inetpub\wwwroot\IPFSDiffGramRick\App_Code\DiffgramService.cs:line 788&lt;/p&gt;
&lt;p&gt; &amp;nbsp; at DiffgramService.UpdateDBData(DataSet updatedDBDataSet, String data1, String data2, String data3, String data4, String data5) in c:\Inetpub\wwwroot\IPFSDiffGramRick\App_Code\DiffgramService.cs:line 756&lt;/p&gt;
&lt;p&gt; &amp;nbsp; --- End of inner exception stack trace ---&lt;/p&gt;
&lt;p&gt;Ideas?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Rick&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#9566618</link><pubDate>Fri, 24 Apr 2009 15:43:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9566618</guid><dc:creator>infopath</dc:creator><description>&lt;p&gt;Hi Rick,&lt;/p&gt;
&lt;p&gt;Please accept our apologies as there is a slight error in the web service code. If you look in the &amp;quot;MergeAndUpdateDBData&amp;quot; function, you will see this line of code:&lt;/p&gt;
&lt;p&gt;DateTime timeStampFromTimeTable = (DateTime)updatedDBDataSet.Tables[TimeTable].Rows[0][QueryTimeColumn];&lt;/p&gt;
&lt;p&gt;When there are now rows in this table, this will generate the error you referenced. You need to comment that line of code and replace it with the following:&lt;/p&gt;
&lt;p&gt;DateTime timeStampFromTimeTable = Convert.ToDateTime(&amp;quot;1/1/1900 12:00:00 AM&amp;quot;);&lt;/p&gt;
&lt;p&gt;if (updatedDBDataSet.Tables[TimeTable].Rows.Count &amp;gt; 0)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;timeStampFromTimeTable = (DateTime)updatedDBDataSet.Tables[TimeTable].Rows[0][QueryTimeColumn];&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Scott&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#9754926</link><pubDate>Mon, 15 Jun 2009 22:53:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9754926</guid><dc:creator>patrick1628</dc:creator><description>&lt;p&gt;Hi Guys,&lt;/p&gt;
&lt;p&gt;I am a newbie doing this. How do I customize the web service for my database? Which form do I go to? What do I put?&lt;/p&gt;
&lt;p&gt;Please help.. or if you have any tutorials, please help!&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
</description></item><item><title>re: Submitting to a Database (via Web Services) in InfoPath Forms Services</title><link>http://blogs.msdn.com/infopath/archive/2007/01/29/submitting-to-a-database-via-web-services-in-infopath-forms-services.aspx#9762548</link><pubDate>Tue, 16 Jun 2009 18:41:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9762548</guid><dc:creator>patrick1628</dc:creator><description>&lt;p&gt;Hi Pls Help.&lt;/p&gt;
&lt;p&gt;I got &amp;quot; Could not open web service&amp;quot; error when trying to configure infopath form. &lt;/p&gt;
&lt;p&gt;it says not enugh space is available to process the command. &lt;/p&gt;
</description></item></channel></rss>