Hi to all,
I get this ArgumentException just when:
((System.ComponentModel.ISupportInitialize)
(this.dataTable2)).EndInit();
runs inside InitializeComponent()...
It raises when I set primary key on the table:
The code I use is:
this.dataTable2.Columns.AddRange(new System.Data.DataColumn
[] {this.dataColumn3, this.dataColumn4});
this.dataTable2.Constraints.AddRange(new
System.Data.Constraint[] {
new System.Data.UniqueConstraint("Constraint1", new
string[] {"dm_dpt_id", "dm_mod_id"}, true)});
this.dataTable2.PrimaryKey = new System.Data.DataColumn[] {
this.dataColumn3, this.dataColumn4};
this.dataTable2.TableName = "dm";
this.dataColumn3.AllowDBNull = false;
this.dataColumn3.ColumnName = "dm_dpt_id";
this.dataColumn3.DataType = typeof(int);
this.dataColumn4.AllowDBNull = false;
this.dataColumn4.ColumnName = "dm_mod_id";
this.dataColumn4.DataType = typeof(int);
Table dm:
+---------------------+
| dm |
+---------------------+
| PK int(4) dm_dpt_id |
| PK int(4) dm_mod_id |