smodesitt
asked on
Invalid Column Name SQL error after renaming table field name
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.
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.
Are you using a stored procedure or class layer to hit the database? I would do a search on the whole project and make sure that you got all instances of the variable name updated. If notthing else, post the code and table layout for review.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Triple Check..