[Mono-devel-list] [PATCH] bug in System.Data.DataTableCollection.Add(DataTable table)

eran erand at mainsoft.com
Thu Sep 18 04:11:31 EDT 2003


Hi,
 
This is a bug I found in System.Data.DataTableCollection.Add(DataTable
table).
1.	You can add the same table more then once to a DataSet
2.	You can add a table to a DataSet that already has a table with
the same name in it.
 
Steps to reproduce the problem:
1.	Create a DataSet. Create new DataTable. Add the table to the
DataSet. Add the table to the DataSet again. 
2.	Create a DataSet. Create new DataTable with "table1" as a
TableName (new DataTable("table1")).
Create a second DataTable with "table1" as a TableName (new
DataTable("table1")). Add the table to he DataSet. 
 
Actual Result:
The tables are added to the DataSet.
 
Expected Result:
In both cases an Exception should be thrown.
 
Enclosed is a small test and a patch.
 
Thanks
Eran Domb
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030918/c390e918/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DataTableCollection.cs.diff
Type: application/octet-stream
Size: 1124 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030918/c390e918/attachment.obj 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TestCase.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030918/c390e918/attachment.pl 


More information about the Mono-devel-list mailing list