Peter Petrov’s Weblog

var me = from practice in programming where practice.IsBestPractice && practice.UseLambda select practice.OptimalPerformance;

SQL Server 2008 Management Studio – Rename column & Intellisense August 8, 2008

Filed under: SQL — ppetrov @ 5:41 pm
Tags: , , ,

Yesterday when I have played around with SQL Server 2008 Management Studio(SSMS) RC0. I have spotted a bug and I have filed a bug report. The new SSMS has Intellisense but it isn’t invalidated when you rename a column. When we fire SSMS and write a simple query everything is correct.

When I rename the column from Name to RoomName the Intellisense isn’t updated.

As you can see the column name is RoomName but Intellisense still proposes Name.

The Query editor is also not refreshed as shown above.

It says “Invalid column name” when the it’s perfectly valid. Note that the parse command completed successfully (as expected). The query runs with no problems.

I hope it will be fixed in the final release.

Advertisements
 

7 Responses to “SQL Server 2008 Management Studio – Rename column & Intellisense”

  1. Joshua Says:

    This is not only for column this is for everything you create or rename. Try to rename View or Table and intellisence won’t even list it.

  2. GeertWil Says:

    Press CTRL-SHIFT R to refresh local cache and everything should work again.

  3. Don Draper Says:

    CTRL-SHIFT R does nothing for me. I can exit and restart SSMS and still does not work. Thanks for reporting this bug.

  4. Don Draper Says:

    Oops (egg on face). I guess it did work. By the time I had finished leaving this comment and returned to SSMS, the CTRL-SHIFT R must have worked as it now recognized the updated names. Perhaps the MS guys should have issued a “behind the scenes” refresh when objects are renamed. Thanks!

  5. Enow Mbi Says:

    having a problem with vs 2008,sql 2008 using linq.tried selecting from a table that i renamed a column from hospital to site and it keeps telling me invalid column name ‘Hospital’.tried the above with the sql server still didn’t work

  6. Enow Mbi Says:

    i solved it.check this site http://blog.benhall.me.uk/2007/08/effects-database-changes-have-on-linq.html

    it has a good post.i removed my database from the datacontext and then put it again.

  7. Sameer Malhotra Says:

    I faced a similar issue but instead of column name I renames the table but intellisense was still showing old table name.
    I tried
    CTRL + SHIFT + R in SQL SERVER 2008 which worked for me.

    Thanks for the nice post 🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s