<?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>Data Connections</title><link>https://www.infopathdev.com:443/forums/44.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Submit InfoPath Data to Multi tables in MS-SQL Server</title><link>https://www.infopathdev.com:443/forums/thread/52407.aspx</link><pubDate>Wed, 03 Mar 2010 20:24:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52407</guid><dc:creator>jinh@globaledgesys.com</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52407.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=52407</wfw:commentRss><description>&lt;p&gt;Thank you Patrick!&lt;/p&gt;</description></item><item><title>Re: Submit InfoPath Data to Multi tables in MS-SQL Server</title><link>https://www.infopathdev.com:443/forums/thread/52400.aspx</link><pubDate>Wed, 03 Mar 2010 18:39:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52400</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52400.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=52400</wfw:commentRss><description>&lt;p&gt;Hi Jinh and welcome to the forum!&lt;/p&gt;
&lt;p&gt;InfoPath does not natively support submitting to multiple tables from a data source created from an XML schema (the default option when creating a form). You have to either re-create your form from the database or use a Web Service like Qdabra&amp;#39;s DBXL. Or,&amp;nbsp;YOU CAN WRITE CODE! :) &amp;nbsp;... seems like that is the option you are taking. The challenge here is locking and synchronizing data to prevent overwrites and make sure you update the relational DB schema correctly. Certainly, the codeless approach is simpler and will be less maintenance down the road. Of the two &amp;quot;codeless&amp;quot; approaches, the best practice is to use a Web Service because it separates the presentation layer from the data representation layer better. With a Web Service in the middle, you can update the form or the database without breaking the submit process. &lt;/p&gt;
&lt;p&gt;I hope this was a tad helpful. Sorry it couldn&amp;#39;t be more so.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Submit InfoPath Data to Multi tables in MS-SQL Server</title><link>https://www.infopathdev.com:443/forums/thread/52305.aspx</link><pubDate>Mon, 01 Mar 2010 20:53:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52305</guid><dc:creator>jinh@globaledgesys.com</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52305.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=44&amp;PostID=52305</wfw:commentRss><description>&lt;p&gt;Hello All,&lt;/p&gt;
&lt;p&gt;Hoping that I put this in the right post, if not please assist.&lt;/p&gt;
&lt;p&gt;I have a client require me to create an InfoPath form base on their existing database.&lt;/p&gt;
&lt;p&gt;The client has total of 3 tables which listed as follow:&lt;/p&gt;
&lt;p&gt;Table 1 = Client with (ClientID [int], [PK]), (ClientName [varchar(50)])&lt;/p&gt;
&lt;p&gt;Table 2 = Country with (CountryID [int], [PK]), (CountryName [varchar(50)], (ClientID [int], [FK])&lt;/p&gt;
&lt;p&gt;Table 3 = State with (StateID [int], [PK]), (StateName [varchar(50)], (CountryID [int], [FK])&lt;/p&gt;
&lt;p&gt;As you can see there&amp;#39;re some foreign keys which has their relationship point from (many[Country] to 1[Client]), and (many[State] to 1[Country])&lt;/p&gt;
&lt;p&gt;However, I can create a database connection via UDCX to pull the datas, but I&amp;#39;m having problem to create a submitting data.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What I&amp;#39;ve done so far is that I be able to submit the data into just one table which is the [Table 1], but I can&amp;#39;t submit the data to their related tables.&lt;/p&gt;
&lt;p&gt;I used the Stored Procedures to submit to the database via the UDCX connection.&lt;/p&gt;
&lt;p&gt;What I don&amp;#39;t know how to do is......&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know how to create a right Stored Procedures that will allow me to insert with the following sql query statement from within the c# coding.&lt;/p&gt;
&lt;p&gt;&amp;quot;exec AddClient &amp;#39;&amp;quot; + clientName + &amp;quot;&amp;#39;, &amp;#39;&amp;quot; + countryName + &amp;quot;&amp;#39;, &amp;#39;&amp;quot; + stateName + &amp;quot;&amp;#39;&amp;quot;;&lt;/p&gt;
&lt;p&gt;AddClient is the Stored Procedure name, clientName, countryName, &amp;amp; stateName are the field value which collected from the infopath &amp;quot;selectSingNode&amp;quot; statement.&lt;/p&gt;
&lt;p&gt;Everytime I debug, I got a sql conn.Execute() error which doesn&amp;#39;t make any sence to me.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please help me out as I&amp;#39;ve been trying with a dead-end on google search.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you very much in advance!&lt;/p&gt;</description></item></channel></rss>