Tuesday, February 14, 2012

Column AnyColumn does not belong to table Table

Does anyone know about this error:

Column 'AnyColumn' does not belong to table Table

You have to provide more info. When are you getting this message? Eg: while using datareader, datatable, gridview etc.

|||

My guess is that you took a code sample that looked like this and tried to use it:

select AnyColumn from Table

Unless you have a table with the name of "Table" with a column in it with a name of "AnyColumn", it will never work.

You need to change Table to the name of the table you want to query from, and AnyColumn to the name of a column in that table whose value you want to see.

If I guessed wrong, you will need to supply the sql statement that you are executing.

|||

Solved it! It was a weird error because returns the name Table and it does not exist against database.

Problem was the field 'Flg_reset' that does not exist on table 'Customers'.

It was solved but I could not figure out wht error was:

Column 'Flg_reset' does not belong to tableTable

Thank you all

No comments:

Post a Comment