While I understand where you're coming from, DataSets' integration with XML is a feature, not the core of a DataTable...therefore requiring the whitespace to be non-relevant because XML needs it that was makes no sense to me (and no, DataSets are not stored internally as XML).
Thanks, Shawn Wildermuth http://adoguy.com C# MVP, MCSD.NET, Author and Speaker -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Reed Sent: Tuesday, October 25, 2005 10:51 AM To: [email protected] Subject: Re: [ADVANCED-DOTNET] Primary Key Bug Let's look at this from another perspective. <?xml version="1.0" standalone="yes"?> <NewDataSet> <Table1> <Key>key1</Key> </Table1> <Table1> <Key>key1 </Key> </Table1> </NewDataSet> The above is the XML representation of your datatable (in a dataset). The point is that if you tried to make the Key element unique in the above XML, it would complain because the spacing is not relevant to an XML document. Thus, you should always view data within ADO.NET as if it was represented by a XML file. This is not a bug. This is by design of XML. Hope this helps! Christopher Reed Web Applications Supervisor Information Technology City of Lubbock [EMAIL PROTECTED] "The oxen are slow, but the earth is patient." >>> [EMAIL PROTECTED] 5:00:33 pm 10/24/2005 >>> Anybody noticed that this code errors? Is this fixed in 2.0? Module Module1 Sub Main() Dim DT As New DataTable DT.Columns.Add("Key", GetType(String)) DT.Rows.Add(New Object() {"key1"}) DT.Rows.Add(New Object() {"key1 "}) DT.PrimaryKey = New DataColumn() {DT.Columns("Key")} End Sub End Module =================================== This list is hosted by DevelopMentor. http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
