Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default to the T-SQL Pane view within Visual Studio 2012 Database Project

When working with a Database Project in Visual Studio 2012, VS defaults to the "Design-View" pane when you add or edit a table. While you can work in split-screen mode, the T-SQL pane defaults to the bottom pane.

As I prefer to work with T-SQL directly as opposed to the designer, I constantly am switching to make the T-SQL pane the top-most editor in order to work with the object. Unfortunately, VS does not remember this preference, so each and every time I work with a table I must change to make the T-SQL pane appear on top as opposed to beneath the designer pane.

I've looked to see if there is a setting under Tools --> Options to control this behavior, but so far I have been unable to find a setting that does so. I've done a few google searches on the topic as well, but haven't found anything helpful for this particular case.

This is more of an annoyance than anything else for me, but as I am finding myself constantly switching panes I wonder if anyone knows of a setting, either within VS or the registry or some other config file that would force VS to either remember my preference or default to the T-SQL Pane on top of the Designer Pane?

like image 885
Tim Lentine Avatar asked Jan 28 '13 20:01

Tim Lentine


People also ask

How do I view SQL database in Visual Studio?

To connect to a database instance In Visual Studio, make sure that SQL Server Object Explorer is open. If it is not, click the View menu and select SQL Server Object Explorer. Right-click the SQL Server node in SQL Server Object Explorer and select Add SQL Server.

How do I view table data in Visual Studio?

It's just right click on the table in your Database Schema in Server Explorer then choose Show Table Data.


1 Answers

If you want to get rid of the designer completely, try the following:

  1. Right-click on the file, and select Open With...
  2. Select Microsoft SQL Server Data Tools, T-SQL Editor,
  3. Click on Set as Default
  4. Click OK.

Next time you'll be able to simply double clicking the file to open it in T-SQL.

like image 191
joerage Avatar answered Sep 30 '22 11:09

joerage