What are the challenges you face when working across database platforms? Take the survey
Options

New tables not appearing / Caching question

JRMorrisJRMorris Posts: 5
edited January 26, 2007 1:01PM in SQL Prompt Previous Versions
Hiya,

Just created 2 new tables in a database.. they aren't appearing in prompt list. Have tried reconnecting to DB and also closing & restarting SQL server management studio.

Comments

  • Options
    FYI forcing a cache refresh sorted it.

    Do you always have to force a cache refresh when adding new sp's, tables etc?
  • Options
    Bart ReadBart Read Posts: 997 Silver 1
    Hi there,


    Thanks for posting. That's correct. Unfortunately one of the features we had to drop for version 3 was support for objects that were defined only in the current script and don't yet exist in the database. If you stop and think about it for a few seconds you'll realise just how hard this is to get dead right. For example:

    USE db1
    {a}

    CREATE TABLE t1 ...
    {b}

    // More script here

    USE db2
    {c}

    // Some SQL here

    USE db1
    {d}

    // Some SQL here

    DROP TABLE t1
    {e}

    If you look at the placemarkers in the script fragment above you'll see that t1 should be visible at b and d, but not at a, c and e. In the end we decided that this would delay the product significantly, and in any case we were also worried about whether we'd also have time to test it properly.

    At some point it will make an appearance, but for now I'm afraid you do need to refresh the cache.


    Thanks,
    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
Sign In or Register to comment.