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

Miguel de Icaza miguel at xamarin.com
Fri May 2 20:28:15 UTC 2014


This looks good to me!


On Thu, May 1, 2014 at 11:38 AM, Neale Ferguson
<NealeFerguson at verizon.net>wrote:

> 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)
>                                        {
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140502/9bae4763/attachment.html>


More information about the Mono-devel-list mailing list