Sacred cow ... for me it was a killer.
Actually, it was a SQL Collation problem for me, because I had a field in LINQ-to-SQL called Dataarea , but in my SQL view this field was called Dataarea . The problem was in upper building A in the Area.
Normally, SQL is not case sensitive for field names, but if your SQL collation is Danish Norwegian, then this works, and I get that "the specified cast is invalid."
A strange mistake.
source share