Some tables I'm dealing with have zero values ββand cause errors. So far, ive tried several solutions to deal with zeros without success.
Here are code examples from my efforts so far;
If (r("datemodified").Equals(DBNull.Value)) Then datemodified = String.Empty Else datemodified = (r("datemodified")) End If
and
If r.HasRows Then datemodified = (r("datemodified")) Else datemodified = String.Empty End If
and;
If r("datemodified") = Nothing Then datemodified = String.Empty Else datemodified = (r("datemodified")) End If
and;
If r.IsDBNull("datemodified") Then datemodified = String.Empty Else datemodified = (r("datemodified"))
and through sql;
Select isnull(datemodified, '')
The end result is an IndexOutOfRangeException.
here is sql;
select datemodified, maintainedby, email, hitcount from grouping where id = @footid
ps, I fulfilled the request and it works fine (i.e. all cols exist)
source share