Please Login to Continue

The 25 Habits of Highly Successful Investors

The 25 Habits of Highly Successful Investors

$10.00

Bath and Body Works Candle (Cheap)

Bath and Body Works Candle (Cheap)

$20.00

BIGBEN Connect

BIGBEN Connect

$1.00

Sql Server Error, Entity Framework Core Error: An unhandled exception occurred while processing the request. SqlException: Invalid column name 'ColumnName'. Invalid column name 'AnotherColumnName'.

Question: How do you resolve, An unhandled exception occurred while processing the request.
SqlException: Invalid column name 'ColumnName'.
Invalid column name 'AnotherColumnName'.

Microsoft.Data.SqlClient.SqlCommand+<>c.<ExecuteDbDataReaderAsync>b__164_0(Task<SqlDataReader> result)

 

Answer:

1. The answer could be pretty simple, there is a big chance that you "my friend" has misspelled the name of the Column somewhere in your code. This is when the Developer Instinct has to kick in. Slow down, and double-check the very column name with an error on. That same column name might very much be misspelled.

2. Go to your SQL Server Table where the column with an error is located, in the "Object Explorer" expand the dbo.TableName, then expand the "Column" folder. Again, Double-check if the column was created in the first place (in the table), if indeed the column was created, then check if it is the same as defined in your code.

 

EF Core Error SQL Server Error Invalid column name Sql Server. Technology published

Was this page helpful?

Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful..



© 2020 - ErnesTech - Privacy