Intellisense not updating after USE statement
mbray
Posts: 9 Bronze 1
in SQL Prompt
Using SQL Prompt 9.0.6.3580 from inside Visual Studio 2015... If I open a SQL file, and then choose a connection from my history, SQL Prompt provides proper Intellisense for my default database A. However, if I try to switch to database B with the "USE" command, it doesn't detect the change, and still provides Intellisense for the initial database A. If I then use the database dropdown at the top of the SQL window to switch databases to another database (any database) and then back to database B, the Intellisense works correctly.
Is this a known issue?
Is this a known issue?
Tagged:
Answers
Thanks for your post and apologies that it has slipped through our net.
I hope that you aren't still experiencing difficulties but if you are please try the latest version which is linked below for you.
ftp://support.red-gate.com/patches/SQLPrompt/18Apr2018/SQLPrompt_9.1.8.4871.exe
Kind regards
Richard Lynch.
Redgate Software
Here's a more specific set of procedures to reproduce:
- In Visual Studio, open a new file using the template "Sql File"
- Use the connect button to connect to a database (I simply pick one from my history)
- Type "ALTER PROCEDURE" (or "AP" shortcut) and hit space - the list of procedures from the current database are listed
- Clear the text, then type "USE <someOtherDatabase>" and execute. Note that the database dropdown should now list "<someOtherDatabase>" as the current database.
- Clear the text, then type "ALTER PROCEDURE" (or "AP" shortcut) and hit space... the list of procedures in the intellisense dropdown are the same ones as listed previously, not the procedures from the new database
- OPTIONALLY... manually switch the database back to the original using the database dropdown selector, then back to <someOtherDatabase". Now, repeating step 5, the intellisense dropdown list is correct.
Contrast this with manually switching the database, which works correctly: