7

Not sure why the Query and View Designer is not appearing as per

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.

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

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.

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.)

MS page tells me Tools / Options / Visual Database tools - but this doesn't exist on my installation!

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.

peter_g
  • 309
  • 1
  • 2
  • 13
  • Have tried fresh install of everything on fresh Win8.1. Only thing that comes up with anything like the visual tools is VS2012 connected to SQL2008. VS2012-SQL2012 = No, VS2013-SQLxxxx = No – peter_g Nov 15 '13 at 15:43

5 Answers5

12

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:

.NET Framework Data Provider for OLE DB
.NET Framework Data Provider for SQL Server (This is probably selected by default)

try changing to the OLE DB connection.

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.

SuperGSJ
  • 136
  • 1
  • 2
  • I think that's got it! I've done some tests and there's the odd time that the LDF file is in use during publish, for instance, after deleting the contents of a table or something. But it settles, and closing VS forces it to release if necessary. Will switch back to VS2013 tomorrow and see how it goes. – peter_g Nov 19 '13 at 21:19
  • Are you able to modify / add tables? I'm no longer seeing that option. – peter_g Nov 20 '13 at 11:33
  • 2
    Ok, it's a multiple connection thing. I can create two connections - one using SQL Server Database File (SqlClient), and another using the SQL Server + Framework for OLE DB option. The first is used for table designing etc. and for the actual connection string in the software, and the second is used for the visual query tools. Publish still works and doesn't fail with a file in use. – peter_g Nov 20 '13 at 12:01
  • I'm using vs2013 and azure db. the ole db option doesn't work for me. I like to open the query designer, however, I only can select a table, view, stored procedures and function. There is no option to open designer. – L.T. Sep 15 '15 at 14:44
  • I cannot upvote this enough! I've been searching forever to find this! Thank you! – Dan Jul 06 '23 at 15:42
4

Was searching for a solution to a similar issue. Unable to use Query Designer for a local mdf file database. 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).

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. "

My current workaround is to use Visual Studio 2012 Server Explorer to view data and write queries for a local MDF file. And to use Visual Studio 2013 for everything else.

A Newton
  • 96
  • 3
1

I have researched about 5 minutes how to run a query in Visual Studio. At the end I found this:

enter image description here

Vityata
  • 42,633
  • 8
  • 55
  • 100
0

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.

0

This component is called "SQL Server Data Tools". You can download it from MSDN. I found this page simply by googling "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.

Community
  • 1
  • 1
Konstantin K.
  • 168
  • 1
  • 6