Author: radha_chirthanuru | Posted on: 2/10/2010 10:31:42 PM | Views : 326

Hi All,


i am developing an application using ASP.NET with C#.Net and sql server 2005. i have a table in my databse with datetime field and it allows null values.


i am passing null value from code behind if user  not enter the date. for that i had written the method in class file as




public bool Updatedraftbidsinfo(string effictivedate, string expirationdate) { try { OpenConnec(); SqlCommand myCommand = new SqlCommand("sp_updateDraftbid", ObjSqlConnection); myCommand.CommandType = CommandType.StoredProcedure; if (string.IsNullOrEmpty(effictivedate)) myCommand.Parameters.AddWithValue("@effectivedate", DBNull.Value); else myCommand.Parameters.AddWithValue("@effectivedate", effictivedate); if (string.IsNullO ...

Go to the complete details ...