New row in repeating table not inserted correctly. - InfoPath Dev
in

InfoPath Dev

New row in repeating table not inserted correctly.

Last post 09-25-2012 06:22 AM by flyingoat. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-20-2012 08:31 AM

    New row in repeating table not inserted correctly.

    Hey guys, I have a annoying problem while working with InfoPath form, I have a parent table (tbl_Parent {Parent_ID, name, ...}) and child table(tbl_Child{Child_ID,Parent_ID, name,.. }) in the database, Parent_ID is the primay key of parent table, Child_ID is the primary key for child table, they have one to many relationship. Then I designed a main infopath form with data fields associated with parent table and a repeating table in the form with data fields associated with child table. In the Infopath form, the main connection has two tables associated by Parent_ID.
    I can submit data into two tables correctly, but when I retrieve, make some changes on existing rows and add a new row in the repeating table and resubmit, one of the existing rows will be re-inserted again, instead of new row. Sounds like you cannot make changes and add new row at the same time, is that right?

    By the way, I am using InfoPath 2010, but in order to enable the "submit" button and submit data to database directly, I changed form type from "Web browser form" to "InfoPath 2007 filler form".

    Do you guys happen to know the solution for this? Thanks a lot!

    Filed under:
  • 09-20-2012 02:04 PM In reply to

    Re: New row in repeating table not inserted correctly.

    Oh, this is a bug!!!! From a Microsoft contact:

    Problem: You have an InfoPath form bound to a database.  If only Inserts are performed, this works fine, and if only Updates are performed, this works fine.  But if an Update and an Insert are performed in the same batch, then the Update changes its record, and then the Insert gets sent... but with the values from the Update.   Cause: This issue is caused by a regression in the ADO libraries that ship as part of current versions of Microsoft Windows. Resolution: This issue was resolved by the fix Incorrect values are updated after an application calls the UpdateBacth() method in Windows 7 or in Windows Server 2008 R2   http://support.microsoft.com/kb/2591857 

    The article has a link to download the fix.

     

    Hilary Stoupa

  • 09-25-2012 06:22 AM In reply to

    Re: New row in repeating table not inserted correctly.

     Thank you very much Hilary!

    That really helps a lot!

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.