try
{ var sql = "SELECT ti_id_10888, ti_summary_10888, ti_description_10888, ti_estimation_10888, ti_priority_10888, ti_status_10888, ti_sprint_id_10888 FROM ti_ticket";
var command = new SqlCeCommand(sql, connection);
connection.Open();
var reader = command.ExecuteReader();
while (reader.Read())
{
var t = GetFromReader(reader);
result.Add(t);
}
}
return result;
}
private Ticket GetFromReader(SqlCeDataReader reader)
{
var t = new Ticket
{
Id = Convert.ToInt32(reader.GetValue(0)),
Summary = reader.GetValue(1).ToString(),
Description = reader.GetValue(2).ToString(),
Estimation = Convert.ToInt32(reader.GetValue(3)),
Priority = reader.GetValue(4).ToString(),
Status = reader.GetValue(5).ToString(),
Sprint = new SprintManager().GetById(Convert.ToInt32(reader.GetValue(6)))
};
return t;
}
I have null values in the data, please help? I have to get all rows that are null or not null values
The error is "Object cannot be cast DBNULL to other types"