[Mono-bugs] [Bug 77404][Maj] New - Simple Data Table created by
Visual Studio generates an exception
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Jan 30 10:34:32 EST 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by don at edvalson.net.
http://bugzilla.ximian.com/show_bug.cgi?id=77404
--- shadow/77404 2006-01-30 10:34:32.000000000 -0500
+++ shadow/77404.tmp.30276 2006-01-30 10:34:32.000000000 -0500
@@ -0,0 +1,65 @@
+Bug#: 77404
+Product: Mono: Class Libraries
+Version: 1.0
+OS:
+OS Details: Windows XP SP2
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: Sys.Data
+AssignedTo: tsenganal at novell.com
+ReportedBy: don at edvalson.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Simple Data Table created by Visual Studio generates an exception
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:I created a simple windows form app with a
+datatable and a data grid. The datatable has two columns and a primary
+key. When you create the primary key you get the following exception
+trace:
+
+Unhandled Exception: System.ArgumentException: Column must belong to a
+table.
+in <0x0008d> System.Data.UniqueConstraint:_validateColumn
+(System.Data.DataColumn column)
+in <0x0008f> System.Data.UniqueConstraint:_validateColumns
+(System.Data.DataColumn[] columns, System
+.Data.DataTable table)
+in <0x0001b> System.Data.UniqueConstraint:_uniqueConstraint
+(System.String name, System.Data.DataCol
+umn[] columns, Boolean isPrimaryKey)
+in <0x00020> System.Data.UniqueConstraint:.ctor (System.Data.DataColumn[]
+columns, Boolean isPrimary
+Key)
+in <0x00132> System.Data.DataTable:set_PrimaryKey (System.Data.DataColumn
+[] value)
+in <0x0047d> MonoTest.Form1:InitializeComponent ()
+in <0x00013> MonoTest.Form1:.ctor ()
+in (wrapper remoting-invoke-with-check) MonoTest.Form1:.ctor ()
+in <0x00018> MonoTest.Form1:Main ()
+
+However the column does belong to a table, but the DataTable doesn't
+think it does because the datatable is still inside of BeginInit..EndInit
+so it hasn't actually added the columns to the table yet.
+
+Steps to reproduce the problem:
+1. Run the attached progam
+2.
+3.
+
+Actual Results: Exception
+
+
+Expected Results: To see an empty data grid
+
+
+How often does this happen? always
+
+
+Additional Information:This program has no code in it not generated by
+the visual studio form builder.
More information about the mono-bugs
mailing list