简体   繁体   English

Visual Studio 2013 SQL查询和视图设计器未显示

[英]Visual Studio 2013 SQL Query and View Designer not appearing

Not sure why the Query and View Designer is not appearing as per 不确定为什么查询和视图设计器没有显示出来

http://msdn.microsoft.com/en-us/library/vstudio/ms172013.aspx http://msdn.microsoft.com/en-us/library/vstudio/ms172013.aspx

It's an ASP.net project with database in the AppData folder, and a connection using SQL 2008 Express. 它是一个ASP.net项目,在AppData文件夹中有数据库,使用SQL 2008 Express连接。

If it helps the connection string is: 如果它有助于连接字符串:

Data Source=.\\SQLEXPRESS;AttachDbFilename="C:\\folders...\\App_Data\\database.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True 数据源=。\\ SQLEXPRESS; AttachDbFilename =“C:\\ folders ... \\ App_Data \\ database.mdf”; Integrated Security = True; Connect Timeout = 30; User Instance = True

If I open the project in VS2012 (where I've worked on this project for some time), find a table, right click, new query, I get the nice interactive visual design tool. 如果我在VS2012中打开项目(我已经在这个项目上工作了一段时间),找到一个表,右键单击,新查询,我得到了很好的交互式可视化设计工具。

If I open the project in VS2013 (just installed) and do the same, blank page named SQLQuery1.sql and a basic connection to SQL Express (ie. master, model, etc.) 如果我在VS2013中打开项目(刚刚安装)并执行相同的空白页面,名为SQLQuery1.sql,并与SQL Express建立基本连接(即主,模型等)

MS page tells me Tools / Options / Visual Database tools - but this doesn't exist on my installation! MS页面告诉我工具/选项/可视化数据库工具 - 但这在我的安装中不存在!

Am I missing something? 我错过了什么吗?

Also tried with blank project, added App_Data and a new database (so using LocalDB), added a table, right click, new query - exactly the same blank file. 还尝试了空白项目,添加了App_Data和一个新数据库(所以使用LocalDB),添加了一个表,右键单击,新查询 - 完全相同的空白文件。

I have been having the same problem and think I have found the solution. 我一直有同样的问题,并认为我找到了解决方案。

When you are adding the connection to the Database, in the Add Connection Dialog. 将连接添加到数据库时,在“添加连接”对话框中。 Click 'Change...' next to the Data source 点击数据来源旁边的“更改...”

Dialog opens showing 'Change Data Source' 对话框打开,显示“更改数据源”

You probable have selected 'Microsoft SQL Server' and then below that there is a drop down where you can select: 您可能选择了“Microsoft SQL Server”,然后在下面有一个下拉列表,您可以选择:

.NET Framework Data Provider for OLE DB 用于OLE DB的.NET Framework数据提供程序
.NET Framework Data Provider for SQL Server (This is probably selected by default) 用于SQL Server的.NET Framework数据提供程序(默认情况下可能已选中)

try changing to the OLE DB connection. 尝试更改为OLE DB连接。

Click OK, and then complete the rest of the connection on the 'Add Connection' dialog. 单击“确定”,然后在“添加连接”对话框中完成剩余的连接。 I have then found that using the database works as it did in VS2012 and as you are describing above. 然后我发现使用数据库就像在VS2012中那样工作,正如您在上面描述的那样。

Was searching for a solution to a similar issue. 正在寻找类似问题的解决方案。 Unable to use Query Designer for a local mdf file database. 无法将查询设计器用于本地mdf文件数据库。 This is what I found...hope it helps someone. 这就是我发现的......希望它对某人有所帮助。

Reading the comments here ( http://social.msdn.microsoft.com/Forums/sqlserver/en-US/ed4675d3-aa84-47db-bdf5-f852355409e6/query-designer-not-displaying-in-visual-studio-2013?forum=ssdt ). 阅读这里的评论( http://social.msdn.microsoft.com/Forums/sqlserver/en-US/ed4675d3-aa84-47db-bdf5-f852355409e6/query-designer-not-displaying-in-visual-studio-2013 ?forum = ssdt )。

According to the moderator of that forum question (Kevin Cunnane of Microsoft), "in Visual Studio 2013 the query designer and database diagram features are no longer available from the Server Explorer. If you wish to keep using the query designer, the only other workaround for now is to access it from SSMS. " 根据该论坛问题的主持人(微软的Kevin Cunnane),“在Visual Studio 2013中,服务器资源管理器中不再提供查询设计器和数据库图表功能。如果您希望继续使用查询设计器,那么唯一的其他解决方法现在是从SSMS访问它。“

My current workaround is to use Visual Studio 2012 Server Explorer to view data and write queries for a local MDF file. 我目前的解决方法是使用Visual Studio 2012 Server Explorer查看数据并为本地MDF文件编写查询。 And to use Visual Studio 2013 for everything else. 并将Visual Studio 2013用于其他一切。

I have researched about 5 minutes how to run a query in Visual Studio. 我已经研究了大约5分钟如何在Visual Studio中运行查询。 At the end I found this: 最后我发现了这个:

在此输入图像描述

Even though i followed same steps , It did not work at once it gave some error and Studio closed. 即使我按照相同的步骤,它不会立即工作,它给出了一些错误,工作室关闭。 It was problem at my end and unknowingly it got sorted out on its own. 这是我最终的问题,并且在不知不觉中它自己解决了。

This component is called "SQL Server Data Tools". 该组件称为“SQL Server数据工具”。 You can download it from MSDN . 您可以从MSDN下载它。 I found this page simply by googling "vs2013 ssdt". 我只是通过谷歌搜索“vs2013 ssdt”找到了这个页面。 It seems that what TsugaSoft posted is true, however you still can install this component separetely... And it also works for Visual Studio 2012. 似乎TsugaSoft发布的是真的,但你仍然可以单独安装这个组件......它也适用于Visual Studio 2012。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM