开发者

Can I disable Query Designer in Visual Studio in favor of plain SQL editor with highlighting?

I hate the standard Query Designer window that comes up when you select New Query on a data connection in Server Explorer. I'd much rather have a T-SQL Edito开发者_C百科r come up. Is this possible?

Maybe not replace that functionality but a shortcut key or something that would bring up a T-SQL editor?


Tools > Options > Database Tools > Query and View Designers > Panes shown by default

Uncheck the Diagram and Criteria (and Results if you want even more clean look)

Can I disable Query Designer in Visual Studio in favor of plain SQL editor with highlighting?


I found a workaround, although it does not solve the problem completely:

  1. Open Tools > Customize > Commands
  2. Select Context menu: Other Context Menus | Server Explorer
  3. Remove annoying New Query
  4. Click Add Command...
  5. Locate Data > New Query Connection...
  6. Click OK to add it to Server Explorer context menu

This adds New Query Connection... context menu to all Server Explorer connections (as well as the root Data Connections item):

Can I disable Query Designer in Visual Studio in favor of plain SQL editor with highlighting?

This will fire up the T-SQL Editor.

The only problem with this workaround is that, invoked this way, T-SQL Editor has no way of knowing which connection was selected so it asks for connection settings again. You will also have to specify the database in the toolbar (easy if you're working with just one).

Although it's not perfect, I find it a better solution that constantly hitting the Query Designer awkwardness.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜