Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorSureshkumar T <suresh@mono-cvs.ximian.com>2005-02-02 14:42:13 +0300
committerSureshkumar T <suresh@mono-cvs.ximian.com>2005-02-02 14:42:13 +0300
commit6ea1be4df521f701d19ce46cc68635cfa4aae7cf (patch)
tree1253b7c5603a5990dd8dffff5ebecc6fea49b691 /mcs
parentad91310f637f2481bdd02d91dfff0e472eaa120f (diff)
2005-02-02 Sureshkumar T <tsureshkumar@novell.com>
* ForeignKeyConstraint.cs: validating columns: move checking "tables are of same dataset" before "checking column types". fixes nunit failure: ForeignKeyConstraint.CtorExceptions. svn path=/trunk/mcs/; revision=39978
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/System.Data/System.Data/ChangeLog7
-rw-r--r--mcs/class/System.Data/System.Data/ForeignKeyConstraint.cs20
2 files changed, 18 insertions, 9 deletions
diff --git a/mcs/class/System.Data/System.Data/ChangeLog b/mcs/class/System.Data/System.Data/ChangeLog
index 9429e03a552..1e8830daec6 100644
--- a/mcs/class/System.Data/System.Data/ChangeLog
+++ b/mcs/class/System.Data/System.Data/ChangeLog
@@ -1,3 +1,10 @@
+2005-02-02 Sureshkumar T <tsureshkumar@novell.com>
+
+ * ForeignKeyConstraint.cs: validating columns: move checking
+ "tables are of same dataset" before "checking column types".
+
+ fixes nunit failure: ForeignKeyConstraint.CtorExceptions.
+
2005-02-02 Atsushi Enomoto <atsushi@ximian.com>
* DataViewManager.cs : let's just use StringWriter instead of
diff --git a/mcs/class/System.Data/System.Data/ForeignKeyConstraint.cs b/mcs/class/System.Data/System.Data/ForeignKeyConstraint.cs
index 3e03e3ff065..2090b383374 100644
--- a/mcs/class/System.Data/System.Data/ForeignKeyConstraint.cs
+++ b/mcs/class/System.Data/System.Data/ForeignKeyConstraint.cs
@@ -228,6 +228,17 @@ namespace System.Data {
}
+ //Same dataset. If both are null it's ok
+ if (ptable.DataSet != ctable.DataSet)
+ {
+ //LAMESPEC: spec says InvalidConstraintExceptoin
+ // impl does InvalidOperationException
+ throw new InvalidOperationException("Parent column and child column must belong to" +
+ " tables that belong to the same DataSet.");
+
+ }
+
+
for (int i = 0; i < parentColumns.Length; i++)
{
DataColumn pc = parentColumns[i];
@@ -247,15 +258,6 @@ namespace System.Data {
}
- //Same dataset. If both are null it's ok
- if (ptable.DataSet != ctable.DataSet)
- {
- //LAMESPEC: spec says InvalidConstraintExceptoin
- // impl does InvalidOperationException
- throw new InvalidOperationException("Parent column and child column must belong to" +
- " tables that belong to the same DataSet.");
-
- }
}