If the schema for your DataSet contains elements of the same name, but different type, in the same namespace, an exception is be thrown when you attempt to read the schema into the DataSet with ReadXmlSchema. This exception does not occur if you are using .NET Framework version 1.0.
PrivateSub ReadSchemaFromFileStream(thisDataSet As DataSet)
' Set the file path and name. Modify this for your purposes. Dim filename AsString = "Schema.xml"' Create the FileStream object with the file name, ' and set to open the file Dim stream AsNew System.IO.FileStream _
' Read the schema into the DataSet.
' Close the FileStream.