in

InfoPath Dev

Submit to sql database (via webservice) through secondary data connection !

Last post 08-04-2008 05:35 PM by swetha. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-02-2008 12:00 PM

    • swetha
    • Not Ranked
    • Joined on 06-25-2008
    • Posts 7

    Submit to sql database (via webservice) through secondary data connection !

     Can any one  please list the steps to be followed to enable submitting a form through

    a secondary data connection. i.e creating a submit connection after I created the  layout of the form.

     

    Thanks,

    Swetha 

  • 08-03-2008 11:27 AM In reply to

    Re: Submit to sql database (via webservice) through secondary data connection !

    You need to know the URL to the web service but then it is just running through the data connection wizard.

  • 08-04-2008 05:35 PM In reply to

    • swetha
    • Not Ranked
    • Joined on 06-25-2008
    • Posts 7

    Re: Submit to sql database (via webservice) through secondary data connection !

    Clay,

    Thanks for your response!

    As you mentioned, I have the URL for the Web Service and ran through the Data Connection wizard, to no luck. Let me elaborate:

    My objective is to Submit data to a MS SQL backend via Web Services using a Secondary Data Source. For the sake of conversation, the database has one table with 2 columns - id(int), name(char(10)). The Web Method to SubmitData is as follows:

        [WebMethod]
        public void SetDataSet(DataSet1 Data)
        {
            if (Data.HasChanges())
            {
                sqlDataAdapter1.Update(Data.tblOne);
            }
        }

    You can find the rest of the code here: http://pastebin.unl.edu/1401

    From Infopath, I create a new group called grpSubmit under myFields and it appears as follows:
     
    -myFIelds
     |-- dataFields
     |   |---tns:SetDataSet
     |         |--Data
     |           |--ns1:DataSet1
     |             |--(Choice)
     |                |--tblOne
     |                     |---id (of type int)
     |                     |---name (of type string))
     |--grpSubmit      <--- Custom created
          |--idSubmit (of type int)
          |--nameSubmit (of (of type string)

    For a Data Source of type "Submit Data" using Web Services, how can I associate a custom created non-repeating field (idSubmit, nameSubmit) under a custom created group (grpSubmit) to a repeating-field (id, name) that is available in myFields ?

    I intend to a create a form using non-repeating controls (text box) bound to the non-repeating fields idSubmit and nameSubmit. Using a secondary data connection that I created to talk to the Web Service, I want to commit the values that the user entered in the text boxes to the database via the web service.

    The submit process works fine when I use the repeating controls and use the Main Data Connection, but fails when I create custom fields, non-repeating controls and update them using a Secondary Data Connection.

    The real database schema along with the forms involved limits me from using the Main Data Connection for submit.

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