How can we help you today? How can we help you today?

New tables not appearing / Caching question

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.
JRMorris
0

Comments

2 comments

  • JRMorris
    FYI forcing a cache refresh sorted it.

    Do you always have to force a cache refresh when adding new sp's, tables etc?
    JRMorris
    0
  • Bart Read
    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
    0

Add comment

Please sign in to leave a comment.