Invalid Column Name SQL error after renaming table field name
Posted on 2008-10-21
I am working in an ASP.Net project that I inherited. I was doing some cleanup and found some table column names that were misspelled. I wanted to rename the columns so that future searches would find all instances of this name. So, I renamed the field in SQL using Enterprise Manager, then going to Design Table and then renaming the field. Then, I updated all the code with the references to the column.
Now, when I am running debug testing, I get to the ExecuteNonQuery command (I am updating the table), I get the 'SqlException was caught' error. The errors list 'Invalid column name 'oldname'.
There must be something cached somewhere but I'm not sure how to correct this.
We are running Visual Studio 2005, SQL2000.
Thanks for any help.