(listSourceRowIndex, "Each")); //Object cannot be cast from DBNull to other types decimal quantity = Convert.ToDecimal(view.GetListSourceRowCellValue(...
command.Parameters.Add("@RecordCount", SqlDbType.Int, 4); //Note: Here throwing an error :Object cannot be cast from DBNull to other types. command....
The error is pretty explicit: "Object cannot be cast from DBNull to other types"Your database field can (and does) contain SQL NULL values - and when...