RE: Invalid Key node inside constraint error

Tech-Archive recommends: Fix windows errors by optimizing your registry



I found the answer myself. Evidently ReadXMLSchema doesn't like it when you
read in the XML before you read in the Schema. : ) Read the schema first
and no problems.

"tparks69" wrote:

> I have an XML document that I'm reading into a dataset. I programmatically
> created dataadapters and constraints for all the tables and relationships and
> I'm able to insert all the data into the database no problem. Instead of
> running the code to create the constraints all the time, I used
> WriteXMLSchema to write out an .xsd for me that has everything already
> defined. Now when I read this schema back using ReadXMLSchema, I get the
> error:
>
> Invalid 'Key' node inside constraint named: Arrests-Inv_Holding_Facilities
>
> .NET created this .xsd for me, why can't it read it in? I've made no
> changes to it manually. I've seen several messages with this same question
> out on the web, but no answers. Can anyone tell me what the problem is?
.



Relevant Pages

  • Re: XML Literals in VB9 - Whats wring with this?
    ... As for generating xsd scheme, .net framework does provide a tool "xsd.exe", ... it can help you generate xsd from a given sample XML document or generate ... However, since it's code logic is quite simple, the generated schema or ...
    (microsoft.public.dotnet.languages.vb)
  • Re: SQLXMLBulkLoad of text child nodes vs. attributes?
    ... You could use the XSDInference tool to get a XSD schema from xml. ... annotations to make it a proper sqlxml schema. ...
    (microsoft.public.sqlserver.xml)
  • Re: Simple mapping question
    ... Yeap created the XSD for the source and destination, ... The destination schema in your case should be a flat file schema. ... There isn't an XML schema ... ...
    (microsoft.public.biztalk.general)
  • RE: 2.0 dataset issues - again
    ... As for the first question on XML error, ... met is due to the XSD validation of the XML Editor... ... schemas and VS IDE's install directory will contains a copy of these schema ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: XML mapping
    ... XDR to XSD ... Generates an XML schema from an XML-Data-Reduced schema file. ... Generates common language runtime DataSet classes from an XSD schema file. ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)