infopath error "Schema validation found non-data type errors." - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

infopath error "Schema validation found non-data type errors."

Last post 01-20-2011 08:12 AM by Jimmy. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 01-12-2011 10:01 PM

    • ranjeet
    • Not Ranked
      Male
    • Joined on 10-06-2010
    • Pune india
    • Posts 3

    infopath error "Schema validation found non-data type errors."

    hi all m working on infopath form which connected to share point list. m trying to add information in repeating table using C# code. on button click all information is pass to repeating table & dynamically repeating table add new row & fill all information but at point of adding row in table its show an error of "Schema validation found non-data type errors." i don't know where is error actually? total error is System.InvalidOperationException Schema validation found non-data type errors. at Microsoft.MsoOffice.InfoPath.MsxmlInterop.MsxmlDocument.ThrowExceptionFromMsxmlInteropError(MsxmlInteropError eError) at Microsoft.MsoOffice.InfoPath.MsxmlInterop.MsxmlDocument.ThrowExceptionFromHresult(Int32 hrError) at Microsoft.MsoOffice.InfoPath.MsxmlInterop.MsxmlNodeImpl.AppendChild(String strXml) at Microsoft.Office.InfoPath.MsxmlWriter.Close() at System.Xml.XmlWellFormedWriter.Close() at Enquiry_Form.FormCode.btn_Add_Glass_Asset_Clicked(Object sender, ClickedEventArgs e) in form at Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent) at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)
  • 01-12-2011 10:07 PM In reply to

    Re: infopath error "Schema validation found non-data type errors."

    Any chance you might show us your code, since that's where the problem is?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-13-2011 02:39 AM In reply to

    Re: infopath error "Schema validation found non-data type errors."

    It appears you responded to the thread notification e-mail with the following.  Please place all responses in this forum, not in e-mail:

    public void btn_Add_Glass_Asset_Clicked(object sender, ClickedEventArgs e)        {            XPathNavigator Asset_Glass_Nav = this.MainDataSource.CreateNavigator();            XPathNodeIterator Asset_Galss_Iter = Asset_Glass_Nav.Select("/my:myFields/my:CONFIRM-ASST-FORM/my:CONFIRM_ASSET_FORM_REPEATING_TABLE_5/my:CONFIRM_ASSET_FORM_REPEATING_TABLE_6", NamespaceManager);             //save values  of text box(form in to variable            string AnsAssetName = Asset_Galss_Iter.Current.SelectSingleNode("/my:myFields/my:ASSET-ENTRY-FORM/my:SEC-NEWASSETENTRY-GLASS/my:EF-ASSET-CLASS-ANS-ASSET-NAME", NamespaceManager).Value;            string AnsAssetID = Asset_Galss_Iter.Current.SelectSingleNode("/my:myFields/my:ASSET-ENTRY-FORM/my:SEC-NEWASSETENTRY-GLASS/my:EF-ASSET-CLASS-ANS-ASSET-ID", NamespaceManager).Value;            string QWindows = Asset_Galss_Iter.Current.SelectSingleNode("/my:myFields/my:ASSET-ENTRY-FORM/my:SEC-NEWASSETENTRY-GLASS/my:EF-ASSET-GLASS-Q-WINDOWS-NO", NamespaceManager).Value;            string AnsWindows = Asset_Galss_Iter.Current.SelectSingleNode("/my:myFields/my:ASSET-ENTRY-FORM/my:SEC-NEWASSETENTRY-GLASS/my:EF-ASSET-CLASS-ANS-NO-WINDOWS", NamespaceManager).Value;            string QDoors = Asset_Galss_Iter.Current.SelectSingleNode("/my:myFields/my:ASSET-ENTRY-FORM/my:SEC-NEWASSETENTRY-GLASS/my:EF-ASSET-GLASS-Q-DOORS-NO", NamespaceManager).Value;            string AnsDoors = Asset_Galss_Iter.Current.SelectSingleNode("/my:myFields/my:ASSET-ENTRY-FORM/my:SEC-NEWASSETENTRY-GLASS/my:EF-ASSET-CLASS-ANS-DOORS", NamespaceManager).Value;            string QTotalSQFT = Asset_Galss_Iter.Current.SelectSingleNode("/my:myFields/my:ASSET-ENTRY-FORM/my:SEC-NEWASSETENTRY-GLASS/my:EF-ASSET-GLASS-Q-TOTAL-SQFT", NamespaceManager).Value;            string AnsTotalSQFT = Asset_Galss_Iter.Current.SelectSingleNode("/my:myFields/my:ASSET-ENTRY-FORM/my:SEC-NEWASSETENTRY-GLASS/my:EF-ASSET-CLASS-ANS-TOTAL-SQ-FT", NamespaceManager).Value;             string MyNamespace = NamespaceManager.LookupNamespace("my");             using (XmlWriter writer = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:CONFIRM-ASST-FORM/my:CONFIRM_ASSET_FORM_REPEATING_TABLE_5", NamespaceManager).AppendChild())            {                
    writer.WriteStartElement("CONFIRM_ASSET_FORM_REPEATING_TABLE_6", MyNamespace);
                    
    writer.WriteElementString("EF-CONFIRM-ASSET-ASSET-NAME", MyNamespace, AnsAssetName);
                    
    writer.WriteElementString("EF-CONFIRM-ASSET-ASSET-ID", MyNamespace, AnsAssetID);
                    
    writer.WriteElementString("EF-CONFIRM-ASSET-QUETION-1", MyNamespace, QWindows);
                    
    writer.WriteElementString("EF-CONFIRM-ASSET-ANSWER-1", MyNamespace, AnsWindows);
                    
    writer.WriteElementString("EF-CONFIRM-ASSET-QUETION-2", MyNamespace, QDoors);
                    
    writer.WriteElementString("EF-CONFIRM-ASSET-ANSWER-2", MyNamespace, AnsDoors);
                    
    writer.WriteElementString("EF-CONFIRM-ASSET-QUETION-3", MyNamespace, QTotalSQFT);
                    
    writer.WriteElementString("EF-CONFIRM-ASSET-ANSWER-3", MyNamespace, AnsTotalSQFT);
                     
    writer.WriteEndElement();
                    
    writer.Close();
                
    }
     

     

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-13-2011 02:40 AM In reply to

    Re: infopath error "Schema validation found non-data type errors."

    Could you attach a screenshot of the CONFIRM_ASSET_FORM_REPEATING_TABLE_6 node in your data source?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-14-2011 12:39 AM In reply to

    Re: infopath error "Schema validation found non-data type errors."

    Ranjeet, it appears you responded to the notification e-mail and not to this forum thread.  Please respond to this thread on the forum (on the website) and not by responding to the notification e-mail.

    It appears your screenshot did not come through either.  Please attach it here so that we can see it.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-14-2011 12:54 AM In reply to

    Re: infopath error "Schema validation found non-data type errors."

    The cause of this error usually is, if you are trying to update a field having a certain datatype with values that does not match that datatype, for eg. if you are trying to enter a string value to datetime control, you can do that but in that case you have to frmat the control to use string values.

     I would need ur infopath form and code both to know the source of error. If you can pass that along i can point that out.

    Vishal Srivastava
    Senior Software Engineer
    SDG Software Pvt Ltd
  • 01-14-2011 01:27 AM In reply to

    Re: infopath error "Schema validation found non-data type errors."

    I'm pretty sure this is not a datatype issue.  Hence the term "non-data type errors" :-)

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-14-2011 04:30 AM In reply to

    Re: infopath error "Schema validation found non-data type errors."

    I managed to find the screenshot you e-mailed, but I need a picture of your data source, like this one:

     

    you can attach images by clicking the Options tab when you're replying to this thread.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-16-2011 10:09 PM In reply to

    Re: infopath error "Schema validation found non-data type errors."

    I'm saying this for the third time: Do not respond to this thread by e-mail.  Go to the InfoPathDev.com website and post your replies there.  I will not respond to any more of your comments until you do that.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-16-2011 11:22 PM In reply to

    • ranjeet
    • Not Ranked
      Male
    • Joined on 10-06-2010
    • Pune india
    • Posts 3

    Re: infopath error "Schema validation found non-data type errors."

    i am sending screen shot as u suggest Expecting a Favorable Reply.
  • 01-17-2011 12:07 AM In reply to

    Re: infopath error "Schema validation found non-data type errors."

    In your code, it looks like you are trying to create an element called EF-CONFIRM-ASSET-ASSET-ID between EF-CONFIRM-ASSET-ASSET-NAME and EF-CONFIRM-ASSET-QUETION-1, but your screenshot doesn't show a field with that name between those two fields.  Elements must be added in the order they are defined in the schema, and you can't add any that aren't defined.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-20-2011 02:20 AM In reply to

    • ranjeet
    • Not Ranked
      Male
    • Joined on 10-06-2010
    • Pune india
    • Posts 3

    Re: infopath error "Schema validation found non-data type errors."

    i try what ever u suggest but its not giving u proper result still its showing same error
  • 01-20-2011 08:12 AM In reply to

    Re: infopath error "Schema validation found non-data type errors."

    Could you post your modified code?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (13 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.