[Mono-dev] Update SqlParameter.cs to support DateTime2

Neale Ferguson NealeFerguson at verizon.net
Thu May 1 15:38:41 UTC 2014


Proposing the following. Comments?

--- a/mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs
+++ b/mcs/class/System.Data/System.Data.SqlClient/SqlParameter.cs
@@ -594,6 +594,10 @@ namespace System.Data.SqlClient {
                               MetaParameter.TypeName =3D "datetime";
                               sqlDbType =3D SqlDbType.DateTime;
                               break;
+                       case DbType.DateTime2:
+                               MetaParameter.TypeName =3D "datetime2";
+                               sqlDbType =3D SqlDbType.DateTime2;
+                               break;
                       case DbType.Decimal:
                               MetaParameter.TypeName =3D "decimal";
                               sqlDbType =3D SqlDbType.Decimal;
diff --git =
a/mcs/class/System.Web/System.Web.Security/SqliteMembershipProvider.cs =
b/mcs/class/System.Web
/System.Web.Security/SqliteMembershipProvider.cs
index 2acff57..b56308c 100644
--- =
a/mcs/class/System.Web/System.Web.Security/SqliteMembershipProvider.cs
+++ =
b/mcs/class/System.Web/System.Web.Security/SqliteMembershipProvider.cs
@@ -762,6 +762,7 @@ namespace System.Web.Security
                                               dbCommand.Prepare();
=20
                                               numOnline =3D =
(int)dbCommand.ExecuteScalar();
+                                               =
Int32.TryParse(dbCommand.ExecuteScalar().ToString(), out
numOnline);
                                       }
                                       catch (SqliteException e)
                                       {


More information about the Mono-devel-list mailing list