title: Reading XML database according to schema
body: <p>I am having a hard time trying to work with a DataSet, specifically when trying to validate XML data against an schema file.</p>
  
  <p>I am programming with Visual Studio 2008, the XSD is created with it.</p>
  
  <p>I rely on Altova XMLSpy in order to make offline validations, and the troubling comes out when Altova has no complaints when validating data against the schema, yet my VB.NET code is raising an exception.</p>
  
  <p>The code simple reads the XSD schema file, then the XML data file:</p>
  
  <pre><code>Dim tmpDataSet As New DataSet
  (...)
  tmpDataSet.ReadXmlSchema(xsdtreamreader)
  tmpDataSet.ReadXml(xmltreamreader)
  </code></pre>
  
  <p>When executing last line, the following exception occurs:</p>
  
  <pre><code>Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
  </code></pre>