Sam
Sam

Reputation: 10113

Visual Studio 2012 Database Designer - Has the functionality changed?

I recently installed Visual Studio and SQL Server 2012. I'm wondering if I'm missing something because the Database Designer doesn't seem anywhere as friendly as the old version.

In Visual Studio 2010 when I created a SQL User Instance (.mdf) in the App_Data directory, I was able to create tables using a nice interface that was quite similar to SQL Server Management Studio. I'd click save and everything was updated.

In the new version:

1) It seems to create .sql scripts instead of automatically saving my changes

2) I have to update certain things in the TSQL window instead of the Properties area (certain things like Table Name are greyed out in Properties)

3) Creating things like Foreign Keys and Indexes is nowhere near as trivial as it used to be.

Am I missing something from my installation? Or is this the "new way" of doing things? If so, why has it been made, in my humble opinion, more complex?

Upvotes: 10

Views: 21359

Answers (3)

Leon Tanko
Leon Tanko

Reputation: 11

Disconnect your database and connect it again, this time use: .NET Framework Data Provider for OLE DB to get the Visual Query Designer in VS 2012!

First step:

enter image description here

Second step:

enter image description here

Upvotes: 0

Ray
Ray

Reputation: 1

We can no longer do queries visually inside Visual Studio 2012. For those who enjoy typing they can type their queries. This makes joining multiple tables a lot of fun. For those who don't like typing SQL Server Management Studio still has a visual query editor. The other option is to use an older version of Visual Studio.

Upvotes: 0

Dan Nolan
Dan Nolan

Reputation: 4772

The SQL User Instance designers have been replaced with SQL Server Data Tools (SSDT) designers.

Where this is going is that Microsoft is encouraging developers to move towards using a separate Visual Studio project for the database, rather than having it stored as an asset within your application project.

This project system works by synchronizing a set of Offline database object declarations (written in T-SQL) with a physical database during project build.

The replacement designers seem a bit peculiar because they inherit much of their behaviour from those designers used in the offline database projects.

You can read more about SSDT here: http://msdn.microsoft.com/en-us/library/hh272686(v=vs.103).aspx

Of course, there's no reason why you can't use those Online designers to edit your database: instead of clicking Save when you make changes to an object, click Update. This will apply changes directly to your .mdf asset.

Or perhaps do what I do and simply use SSMS to edit your databases instead :)

Upvotes: 14

Related Questions