Hi All,
I have a browser enabled form that is based on a web service and uses that web service to connect to a SQL database.
The form is publised to Sharepoint and can be filled in by our users there, and when submitted the form is submitted to the Database and also to Sharepoint, but all the data is pulled from the database by the forms GUID.
I now have a requirement for a file attachment which would allow the user to submit an attachment with the form that would be stored in the database.
I created a basic table called Attachments, with the fields ID, ptFormGUID (FK) and Attachment which is a VarBinary(MAX) field.
I then added this table to the table list in our web service and added it to the dataset (.xsd). I then refreshed the data connections in Infopath and added the control, uploaded it to Sharepoint and attempted to add an attachment.
The form said it submitted succesfully but when I checked the table whilst a new client had been entered in the client table, there was no new record in the Attachment table.
I then tried to submit the form from the local client and got this error
InfoPath cannot submit the form.
Some rules were not applied.
InfoPath cannot submit the form.
An error occurred while the form was being submitted.
The SOAP response indicates that an error occurred:
System.Web.Services.Protocols.SoapException: Server was unable to read request. ---> System.InvalidOperationException: There is an error in XML document (5, 3562). ---> System.InvalidOperationException: Nested table 'dsForms1' which inherits its namespace cannot have multiple parent tables in different namespaces.
at System.Data.DataRelation.CheckNamespaceValidityForNestedRelations(String ns)
at System.Data.DataRelationCollection.AddCore(DataRelation relation)
at System.Data.DataRelationCollection.DataSetRelationCollection.AddCore(DataRelation relation)
at System.Data.DataRelationCollection.Add(DataRelation relation)
at System.Data.XSDSchema.InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType typeNode, Boolean isRef)
at System.Data.XSDSchema.HandleTable(XmlSchemaElement node)
at System.Data.XSDSchema.HandleParticle(XmlSchemaParticle pt, DataTable table, ArrayList tableChildren, Boolean isBase)
at System.Data.XSDSchema.HandleComplexType(XmlSchemaComplexType ct, DataTable table, ArrayList tableChildren, Boolean isNillable)
at System.Data.XSDSchema.InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType typeNode, Boolean isRef)
at System.Data.XSDSchema.HandleTable(XmlSchemaElement node)
at System.Data.XSDSchema.HandleDataSet(XmlSchemaElement node, Boolean isNewDataSet)
at System.Data.XSDSchema.LoadSchema(XmlSchemaSet schemaSet, DataSet ds)
at System.Data.DataSet.InferSchema(XmlDocument xdoc, String[] excludedNamespaces, XmlReadMode mode)
at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
at NBSWebService.dsForms1.ReadXmlSerializable(XmlReader reader) in E:\VS2008\NBSWebServiceProduction\NBSWebService\dsForms1.Designer.vb:line 299
at System.Data.DataSet.System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader reader)
at System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable, Boolean wrappedAny)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read7_SubmitFormDataset()
at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer12.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
Can anyone tell me if I've done something wrong along the way or whether I've not done something I was meant to do please?
Thanks