<?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: Need a Action to run insert item on repeating tbl</title><link>https://www.infopathdev.com:443/forums/thread/17413.aspx</link><pubDate>Thu, 07 Dec 2006 17:11:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17413</guid><dc:creator>blackduke77</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17413.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17413</wfw:commentRss><description>Thanks for the great responce and so fast, however my colleague and I have no idea what it all means..... Would you be able to help me out :) could be worth some beer!!!&lt;br /&gt;&lt;br /&gt;Thanks</description></item><item><title>Re: Need a Action to run insert item on repeating tbl</title><link>https://www.infopathdev.com:443/forums/thread/17412.aspx</link><pubDate>Thu, 07 Dec 2006 16:13:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:17412</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/17412.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=17412</wfw:commentRss><description>Hi blackduke77 and welcome to the forum!&lt;br /&gt;&lt;br /&gt;There are a couple of ways to do this with code. I will provide some psuedo code below&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;IXMLDOMNode nParent = thisXDocument.DOM.selectSinglNode( "/my:myFields/my:group1" );&lt;br /&gt;&lt;br /&gt;// Create a sample node&lt;br /&gt;IXMLDOMNode nSampleChild = nParent.FirstChild.cloneNode(true);&lt;br /&gt;&lt;br /&gt;// Remove the old nodes&lt;br /&gt;((IXMLDOMSelection)nParent.selectNodes( "my:group2" )).removeAll();&lt;br /&gt;&lt;br /&gt;// Create new nodes&lt;br /&gt;&lt;br /&gt;string[] days = { "M", "T", ... , "S" };&lt;br /&gt;&lt;br /&gt;for( int i = 0; i &amp;lt; 7; i++ )&lt;br /&gt;{&lt;br /&gt;  IXMLDOMNode nNewDay = nSampleChild.cloneNode(true);&lt;br /&gt;  nNewDay.selectSingleNode( "my:Day" ).text = days&lt;i&gt;;&lt;br /&gt;  nParent.appendChild( nNewDay );&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;One problem with this is that the node might not be there when you try to make the sample.  To solve this you could load the XML from the template.xml:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;IXMLDOMDocument tempdom = thisXDocument.CreateDOM();&lt;br /&gt;tempdom.async = false;&lt;br /&gt;tempdom.validationOnParse = false;&lt;br /&gt;tempdom.load( "template.xml" );&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If all else fails you can also get the sample node in the OnLoad event, store it in a global variable, and clone it as desired.  Hope this helps, good luck!</description></item><item><title>Need a Action to run insert item on repeating tbl</title><link>https://www.infopathdev.com:443/forums/thread/16859.aspx</link><pubDate>Thu, 07 Dec 2006 16:00:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16859</guid><dc:creator>blackduke77</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16859.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=16859</wfw:commentRss><description>Hi I hope you can help.&lt;br /&gt;We are creating a Time and attendance form, we have connected the form to SQL and can query and submit data in a repeating table. When the user opens the form he gets a repeating table where they can see 7 rows, one for each day of the week, they have the option of selecting a previous week and running the query to amend historical data (works) however if they select a week where there is no data, ie they are entering data, the repeating table collapses to 0 rows with a insert row option(great), what I am trying to do is get the form to run the query but keep the repeating table with 7 rows, is there a action I can run, or some code, I am very new to managed code.</description></item></channel></rss>