SyntaxHighlighter

Saturday, May 26, 2012

Entity Framework: Invalid column name 'xxx'

I was busy toying with Entity Framework (EF) and some SQL change scripts when I received this error:

SqlException (0x80131904): Invalid column name 'FullName'.

This is how the error occurred: I created my EF data model, dropped the database, added 'FullName' to one of my tables, and updated my data model.

Clearly EF lost a mapping or some DB specific configuration setting. I poked around the web for a while and could not find the exact cause. Some claims point towards schema types or collation settings.

Unfortunately, I don't have the time to figure this one out, so I removed my EF data model and its connection strings in the app.config and recreated it. This resolved the issue, but I have that uneasy feeling this is going to come back to bite me again.

1 comment:

Anonymous said...

Did you resolve this issue already? I have right now the same obstacle and I could not find anything helpful so far...