SqlParameter and DBNull.Value - possible bug?
- From: Martin Ret <MartinRet@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 14 May 2021 08:23:03 -0700
Is following behaviour by design or is it a bug?
For shure breaking change from framework 1.1.
Try under framework => 2.0
SqlParameter param = new SqlParameter("Test", DbType.Int32);
Console.WriteLine("Value: {0}, Type: {1}",param.Value, param.DbType);
param.Value = DBNull.Value;
Console.WriteLine("Value: {0}, Type: {1} --- WTF",param.Value, param.DbType);
Console.ReadLine();
.
- Follow-Ups:
- Re: SqlParameter and DBNull.Value - possible bug?
- From: Bob Barrows [MVP]
- Re: SqlParameter and DBNull.Value - possible bug?
- Prev by Date: Re: Non initialized Cmd Parameter Collection via ASP vs SQL Server
- Next by Date: Re: SqlParameter and DBNull.Value - possible bug?
- Previous by thread: Non initialized Cmd Parameter Collection via ASP vs SQL Server 200
- Next by thread: Re: SqlParameter and DBNull.Value - possible bug?
- Index(es):
Relevant Pages
|