Form Template Failed to Load - InfoPath Dev
in

InfoPath Dev

Form Template Failed to Load

Last post 05-29-2013 01:33 PM by dbaker. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-17-2013 11:56 AM

    • dbaker
    • Not Ranked
    • Joined on 05-17-2013
    • Posts 3

    Form Template Failed to Load

    Hello,

    I have created an InfoPath 2010 web form that uses a Web Service to submit values to a SQL database. What is the best way to incorporate the Web Service into the InfoPath form so that the form can be uploaded to SharePoint?

    Thanks,

    db
  • 05-19-2013 01:27 PM In reply to

    Re: Form Template Failed to Load

    Hi DBaker,

    I would convert the form to a Universal Data Connection and then your form will work in the browser.

    The Web service itself will have to be installed on one of the IIS servers in your domain and it will have to be set up to access your SQL database.

    Good luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 05-20-2013 10:00 AM In reply to

    • dbaker
    • Not Ranked
    • Joined on 05-17-2013
    • Posts 3

    Re: Form Template Failed to Load

    Hi Patrick,

    Thank you for your reply. I've converted all of my data connections to Universal Data Connections. I also have the Web Service up and running. The form works fine in InfoPath. I can upload it to SharePoint as an administrator approved form template. However, the form won't load if I try to open it through SharePoint. I keep getting the following error:

    Type: ArgumentException, Exception Message: Item has already been added. Key in dictionary: 'siteid' Key being added: 'siteid')

    Any ideas what this error means?

    Thank you,

    db

  • 05-20-2013 12:17 PM In reply to

    Re: Form Template Failed to Load

     Oh - you are right, in VSTA you can't seem to do this. Yuck. I guess I'd try manually modifying the .proj file and reloading it....maybe see if you can add the TargetFrameworkVersion to the PropertyGroup?

    Hilary Stoupa

  • 05-29-2013 01:33 PM In reply to

    • dbaker
    • Not Ranked
    • Joined on 05-17-2013
    • Posts 3

    Re: Form Template Failed to Load

    I probably didn't do a very good job of explaining the problem I was having.

    In any case, I was able to resolve it by doing two things:

    1. I reviewed all of my data connections in InfoPath until I found the one that was returning two fields with the same name of 'siteid.' I had included a table's primary key, siteid, in my SQL select statement. However, it appears that InfoPath likes to include primary keys in select statements automatically, which is what caused the error. I removed the 'siteid' field from the SQL select statement that I had manually included and just used InfoPath's automatic primary key.

    2. I followed S.Y.M. Wong-A-Ton's recipe #85 from Cookbook #3 for using the Execute() method of the WebServiceConnection class. This book is the most useful resource I have found on developing InfoPath forms anywhere--online or in print.

    Thanks,

    db

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