

Notice the name=" " entry in the example image below. Look for values inside the connectionStrings tag.

Next, open app.config to examine its contents. When the project is saved, Visual Studio updates setting information in the app.config XML file. However if everything works as it should, don't forget to click the Save toolbar icon to keep your new connection string setting.

If you click Test Connection again and receive another error message, you may wish to read my piece on How to fix common SQL Server Management Studio 'Connect to Server' errors. Write your T-SQL Query and press CTRL SHIFT and E or Right Click and choose Execute Query.To validate your connection, use the Test Connection feature, and click OK if you receive a "test connection succeeded" notification.īut.you may get an error message, which means you'll probably need to double-check the server name, log on credentials, or authentication entries. sql file or when you change the language to SQL as shown above for a new file The mssql extension enables Intellisence for T-SQL when you open a. This has links to tutorials as well as information about the release Which you can get for any extension anytime by finding the extension in the extensions tab and clicking on it. This will start a download so make sure you are connected (and allowed to connect to the internet)Īnd offer you the chance to read the release notes You can do this by clicking CTRL K and then M (Not CTRL K CTRL M) or click the language button Once it has installed the button will change to Reload so click itĪnd you will be prompted to Reload the windowĪccept the prompt and then open a new file (CTRL N) and then change the language for the file. So, with the extensions tab open, search for mssql and then click install Which will open the Extensions tab ( You could have achieved the same end result just by clicking this icon)īut then you would not have learned about the command palette 🙂 Once you start typing the results will filter so type ext and then select Extensions : Install Extension Once you have downloaded and installed hit CTRL SHIFT and P which will open up the command palette To download Code go to this link and choose your operating system. If you are new to Code (or if you are not) go and read Shawns blog post but here are the steps I took to running T-SQL code using Code Reading this blog post by Shawn Melton Introduction of Visual Studio Code for DBAs reminded me that whilst I use Visual Studio Code (which I shall refer to as Code from here on) for writing PowerShell and Markdown and love how easily it interacts with Github I hadn’t tried T-SQL.
