FIX: Cannot derive and extend a column in XSD with DataSet (316820)
The information in this article applies to:
- Microsoft ADO.NET (included with the .NET Framework)
- Microsoft Visual Studio .NET (2002), Professional Edition
This article was previously published under Q316820 This article refers to the following Microsoft .NET
Framework Class Library namespace:
SYMPTOMS When you try to read an Extensible Markup Language (XML)
schema into a DataSet, the following duplicate name exception may be thrown when the
XML Schema Definition language (XSD) derives and extends a column definition:
An unhandled exception of type
'System.Data.DuplicateNameException' occurred in system.data.dll
Additional information: A column named 'column1' already belongs to this
DataTable. If you handle this exception within a try/catch block,
you receive the following error message:
System.Data.DuplicateNameException: A column named 'column1' already belongs to
this DataTable. CAUSE The DataSet is treating the column derivation and extension as if it were the
definition of an entirely new column, with the same name as an existing column.
RESOLUTION To avoid this exception, define a new element type with the
attributes that you want, instead of deriving from and extending an existing
element type. STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
This bug was corrected in Microsoft ADO.NET (included with the .NET Framework 1.1), and Microsoft Visual Studio .NET 2003, Professional Edition.
REFERENCES
For more information about XML integration with
ADO.NET, click the following article number to view the article in the Microsoft Knowledge Base:
313649
Roadmap for XML integration with ADO.NET
For more information about XML schemas in the .NET
Framework, click the following article number to view the article in the Microsoft Knowledge Base:
313826
Roadmap for XML schemas in the .NET Framework
Modification Type: | Minor | Last Reviewed: | 3/10/2006 |
---|
Keywords: | kbvs2002sp1sweep kbfix kbbug kbinterop kbnofix kbSystemData KB316820 kbAudDeveloper |
---|
|