Info Path Cannot Submit Form - InfoPath Dev
in

InfoPath Dev

Info Path Cannot Submit Form

Last post 01-22-2010 08:37 AM by jettpogi. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 01-20-2010 12:40 PM

    Info Path Cannot Submit Form

    I am getting an error upon submit of a form. "The Structure of the Datafield Group has been changed and no longer matches the structure of the data source"

    Some background:

    My connection is to a SQL database and I am using an updatable two table query. On the form it is set up as Master/Detail. Now I have two query buttons. One is the standard out of the box and the other has been modified to use a wildcard search.  The above error occurs with the following steps.  Query using the modified query button. Modify one of the returned records and submit. Immediately following click the new record button, enter data and submit. (error occurs) If I re-query using the modified button before selecting new query button and submitting  it works just fine.   I have no problem with the standard query button and this process until  i use the modified one, then I need to close reopen form to allow the process to work with that button. So it is definately related to my use of the non standard query. 

    Does anyone have any suggestions on how to trouble shoot this? BTW, if I use the new record option at the bottom corner of the master table it works just fine in the above scenario. The difference is that this does not clear the master window for a new record like the new record button does.

     Any help would be appreciated.

    Thank you!

    Mark G

     

     

    Filed under:
  • 01-20-2010 01:39 PM In reply to

    Re: Info Path Cannot Submit Form

    Hi Mark, 

    I am also using modified query button on my form and I thought it's perfect until I read your post. I did the steps you described and boom! I got exactly the same error as you're getting. Maybe there's a need to reset the query back to it's original state before clicking the New Record button. But being a noob myself I have no clue as to how to accomplish this. Anybody here knows how to resolve this issue? I would be very much grateful.

    Jett

    using Microsoft.Office.InfoPath;
  • 01-20-2010 06:55 PM In reply to

    Re: Info Path Cannot Submit Form

     

    Good point Jett but in my code i do set the query back to its original state. Also if you notice you can use the modified button to query and immediately click the NEW RECORD and then Submit button and it is fine. It only seems to have a problem if you 1) use the modified button 2) modify a record  3) Submit then  4)NEW RECORD and try to 5) submit.  The insert record hyperlink in the lower corner of the master table works fine. The difference I see is NEW RECORD clears the returned results where as the hyperlink adds another blank row.   Now one other interesting thing. Once I get the error then I can repeat it on my standard out of the box query button where as the standard button does not have the same problem prior.

    Thanks for responding. I feel better knowing I am not the only one.

    The work around for me is to use the hyper link (insert record)  right now.

     

  • 01-21-2010 06:56 AM In reply to

    Re: Info Path Cannot Submit Form

    Yeah you're right. Checking the code I used, which I also got from the forum, apparently the query is set back to it's original state. I wonder how this issue can be fixed?

    Calling all experts in the forum. We'll very much appreciate it if you can you lend us a hand here please. Thank you.

    using Microsoft.Office.InfoPath;
  • 01-21-2010 08:11 PM In reply to

    Re: Info Path Cannot Submit Form

    Hi -- I'm afraid I've gotten kind of lost reading this thread.... Are both of you using code? The same code?

    For some reason, I recall that with SQL bound forms, the New Record action is one of those special actions that you only have for SQL bound forms, and it may be difficult to replicate in code or with other rules.

    Hilary Stoupa

  • 01-22-2010 05:17 AM In reply to

    Re: Info Path Cannot Submit Form

    Hi Hilary. The code we are referring to is for the RUN QUERY button. I have not modified the NEW RECORD.

    I believe we are both using modified code.

    I should mention that I am using infopath 2003 sp3 against SQL SERVER 2005 ent x64 sp3

    I am not sure if we are using the same code. I did find it at the micrososoft site http://support.microsoft.com/kb/826992

    I have modified it to work with my specific data source and situation (Master detail)  My code for my modified RUN QUERY works great for returning queries.

    However,when  I use it to return a set of records in a master detail, then modify one of the records and Submit, then try to  use the NEW RECORD button and try to SUBMIT a new record I receive the above error.  If I do this same process using standard RUN QUERY button it does not happen, it works, unless....I first produce the error with my modified button then try standard button error will happen.

    If I re-query after the error or after a form change/submit described above the NEW RECORD button will then work.

    I hope this describes it better?

    Thanks for your help.

    Mark

     

  • 01-22-2010 07:40 AM In reply to

    Re: Info Path Cannot Submit Form

    Hi Hilary, I'm afraid I have to join in here :). I also modified my Run Query button with your help in a previous thread. I use InfoPath 2007 with C# as code behind. I thought my form has no problem until I saw this thread. I get the same error doing the steps as described above.

  • 01-22-2010 08:03 AM In reply to

    Re: Info Path Cannot Submit Form

    My code is from here:  http://support.microsoft.com/kb/826992

     Is this C#? or other?

     

  • 01-22-2010 08:37 AM In reply to

    Re: Info Path Cannot Submit Form

    @mganci350, the link you're referring to uses jscript.

    I use C# code following instructions discussed from other posts in this forum as well.

    using Microsoft.Office.InfoPath;
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.