dominos coupon code

shopclues coupon code today

amazon coupon codes india

cleartrip coupons for domestic flights

Promo code offers

How to insert NULL data in SQL Server Using C# ?

Some time we need to insert null value in Database. We can pass DBNull value in sql parameter to save in to database using store procedure.

in c#————————

if (txtDOB.ToString(“yy/mm/dd”) == “01/00/01”)
{
cmd.Parameters.Add(new SqlParameter(“@p_DOB”, DBNull.Value));
}
else
{
cmd.Parameters.Add(new SqlParameter(“@p_DOB”, txtDOB.ToString()));
}

About Ashraful Islam

Check Also

Who created C#?

C# is intended to be a simple, modern, general-purpose, object-oriented programming language. Its development team …

Leave a Reply

Your email address will not be published. Required fields are marked *