Sunday, August 25, 2013

LINQ error with DBNull

LINQ error with DBNull

I have a few null values in my database (wich is correct and normal)
But when I try to use LINQ I get an InvaledCastException: Converion from
type 'DBNull' to type 'String' is not valid.
How can I resolve this? I don't even get it why it throw that error, when
I use a dataview instead o the LINQ, it works perfect.

No comments:

Post a Comment