to fix this exception in strong-type dataset use method IsNull method before reading value to avoid this exception.
in C# it will be like :
if (!logins[0].Isincorrect_attempt_dateNull())
{
incor_pass_hours_ago = DateTime.Now.Subtract((DateTime)logins[0].incorrect_attempt_date).TotalHours;
}
in C# it will be like :
if (!logins[0].Isincorrect_attempt_dateNull())
{
incor_pass_hours_ago = DateTime.Now.Subtract((DateTime)logins[0].incorrect_attempt_date).TotalHours;
}
No comments:
Post a Comment