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
diff options
context:
space:
mode:
authorVeerapuram Varadhan <v.varadhan@gmail.com>2010-04-10 22:44:16 +0400
committerVeerapuram Varadhan <v.varadhan@gmail.com>2010-04-10 22:44:16 +0400
commit34b8092fd76ef44244e2fa917a4ff3a94398a279 (patch)
tree41deb0c31649312a4c0958c3088fe27a5d1227b3
parent16b1c946e1611437dbd15652d3dc7a8901912dc3 (diff)
2010-04-10 Veerapuram Varadhan <vvaradhan@novell.com>
** Fixes #589482 * DataColumn.cs (set_DataType): Preserve autoIncrement value for Decimal types as well. svn path=/branches/mono-2-6/mcs/; revision=155203
-rw-r--r--mcs/class/System.Data/System.Data/ChangeLog6
-rw-r--r--mcs/class/System.Data/System.Data/DataColumn.cs10
2 files changed, 8 insertions, 8 deletions
diff --git a/mcs/class/System.Data/System.Data/ChangeLog b/mcs/class/System.Data/System.Data/ChangeLog
index 218659b3794..d8135ed3e92 100644
--- a/mcs/class/System.Data/System.Data/ChangeLog
+++ b/mcs/class/System.Data/System.Data/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-10 Veerapuram Varadhan <vvaradhan@novell.com>
+
+ ** Fixes #589482
+ * DataColumn.cs (set_DataType): Preserve autoIncrement value
+ for Decimal types as well.
+
2010-04-09 Veerapuram Varadhan <vvaradhan@novell.com>
** Fixes #576520 - Based on a patch by Greg SIROU <gspam@secway.fr>
diff --git a/mcs/class/System.Data/System.Data/DataColumn.cs b/mcs/class/System.Data/System.Data/DataColumn.cs
index 657e0cbb06d..281642d7142 100644
--- a/mcs/class/System.Data/System.Data/DataColumn.cs
+++ b/mcs/class/System.Data/System.Data/DataColumn.cs
@@ -405,15 +405,9 @@ namespace System.Data {
//Check AutoIncrement status, make compatible datatype
if(AutoIncrement == true) {
- // we want to check that the datatype is supported?
- // TODO: Is this the same as CanAutoIncrement or was the omission of Decimal intended?
- TypeCode typeCode = Type.GetTypeCode(value);
-
- if (typeCode != TypeCode.Int16 &&
- typeCode != TypeCode.Int32 &&
- typeCode != TypeCode.Int64) {
+ // we want to check that the datatype is supported?
+ if (!CanAutoIncrement (value))
AutoIncrement = false;
- }
}
if (DefaultValue != GetDefaultValueForType (prevType))