Error submitting data via web service using ado.net - InfoPath Dev
in

InfoPath Dev

Error submitting data via web service using ado.net

Last post 06-23-2008 03:18 PM by Greg Collins. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 02-24-2008 10:46 PM

    Error submitting data via web service using ado.net

    Hi,

    I have a web browser infopath  form that would submit data back to database via web service using ado.net.  When the form is rendered in the browser, the first record to be inserted is automatically blank and cannot be edited that may cause an error when it is submitted.  One of the field is primary key and it is identity column and   I think this causes the error.

    I would appreciate very much if somebody could help me on this issue.

    Thanks in advance.

     

  • 02-25-2008 04:56 PM In reply to

    Re: Error submitting data via web service using ado.net

    In your form template (the designer), you need to edit the "Default Values" (Tools menu, or if using VSTO, Data menu).

    From there you can tell the form to not insert that initial row (uncheck the appropriate box for the row node).

  • 02-25-2008 07:11 PM In reply to

    Re: Error submitting data via web service using ado.net

    Thanks Greg for the prompt reply.

    I tried to do what you have said below but when I try to uncheck box everything will be uncheck also and cannot be edited anymore.

    I'm just new on this, I really need your help.

    Thanks, 

     

  • 02-26-2008 03:04 PM In reply to

    Re: Error submitting data via web service using ado.net

    Here's what I understand your problem to be: When you open a new form, there is an existing blank for in a repeating section/table that you don't want to be there. If that is the case, then this should be the correct approach. Make sure that you are unchecking the correct node. If you have a structure like

    /Root/Table/Row/Fields

    Then you want to make sure to uncheck the node for "Row", and not for "Table". This is important as you will need "Table" to be present if you ever expect to get any other "Row"s into the form.

  • 02-27-2008 07:54 AM In reply to

    Re: Error submitting data via web service using ado.net

     

    Your understanding of my problem is correct. I don't wan't the blank records to be present in the repeating section when i open a new form.

    Have tried your solution to unchek the node for "Row" however, the row that I want to excluded in the form is grayed or can't be unchecked.  Below is the structure.

    myFields
      dataFields
        tns:SubmitVenue
          ds
           ns1:DataSet
             (Choice)
                 VenueSelect
                    VenueID*
                    Venue

    My problem is the "ID" field which I cannot uncheck because it grayed out. 

    I appreciate your help on this.

    Thanks. 

     

     

     

  • 02-28-2008 02:56 PM In reply to

    Re: Error submitting data via web service using ado.net

    I have attempted to create a similar schema here using a Choice Group but am not seeing the same issue that you are seeing.

    I notice from your schema that you are using either a database or web service. Is this the main DOM or a secondary DOM?

    Lastly, will you pelase take a screenshot of the Edit Default Values dialog box and paste it in here (Options tab above on this page) so that I can get a better idea of what exactly is going on?

  • 03-02-2008 10:27 PM In reply to

    Re: Error submitting data via web service using ado.net

     

    I'm using webservice using ado.net.

    Here's the screenshot attached in the option field.


  • 03-03-2008 10:45 AM In reply to

    Re: Error submitting data via web service using ado.net

    I wonder why you are getting a "Choice" group, when there's only one choice? The radio button is not where you want to uncheck (as you cannot anyway), you want to uncheck the the repeating Choice node. That repeating node constitutes your row node in this case.

  • 06-10-2008 04:26 PM In reply to

    Re: Error submitting data via web service using ado.net

    The "Choice" group is automatically inserted when you use an ADO.NET dataset. I'm not quite sure why. It is not "Choice" like a radio button.

    I have the same problem and it's a quandry. My ADO.NET dataset includes the primary keys for the tables that make up the dataset and, of course, they can't be null in SQL Server. The InfoPath datasource requires something to be entered in the primary key fields, but for new rows I have no idea what the primary key field value should be. There's something about how ADO.NET datasets, their DIFFs, and InfoPath that  I don't understand.

    Does anyone know?

    Thanks,

    Chris
     

  • 06-17-2008 03:53 PM In reply to

    Re: Error submitting data via web service using ado.net

    Can you request the dataset to be sent without the primary key columns?

  • 06-17-2008 04:30 PM In reply to

    Re: Error submitting data via web service using ado.net

     Nope. The ADO.NET dataset tracks inserts and deletes and then when you submit the form via the web service the ADO.NET dataset is synced to the database.

     What I found out after much banging of my head against the wall was that the Visual Studio 2005 wizard that helps you define an ADO.NET dataset doesn't always handle changes properly. When I re-created it from scratch it worked fine.


     

  • 06-19-2008 10:02 AM In reply to

    Re: Error submitting data via web service using ado.net

    Glad to hear you got it working. Were you able to identify the differences between the generated dataset and the one you created manually--what might have caused the issue?

  • 06-19-2008 11:22 AM In reply to

    Re: Error submitting data via web service using ado.net

     I created the first version of the dataset using the wizard, then made some changes using the wizard, then made some more changes using the wizard. The last change was for it to use foreign keys and enforce data integrity. But, the wizard didn't actually implement the foreign keys. Then I re-created the dataset from scratch using the wizard and it worked fine, including the foreign keys.

     

  • 06-23-2008 03:18 PM In reply to

    Re: Error submitting data via web service using ado.net

    Interesting. Thanks for sharing this information.

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