Is there a table designer for the VS2010 database project?

Am I missing something? It seems that the only parameters for creating a new table in the database project in VS2010 are:

Create the table object as a file, then create all the constraints (by default) as separate files, then create each index as a separate file and the primary key as a separate file, and then ...

or

Create the whole table schema using the table designer in SSMS, and then use the schema comparison tool to create a single monolithic file of SQL statements for each table element and copy each block of code into the newly created file in VS.

This question was asked 2 years ago, and I hope the answer has changed. Please tell me the hidden table designer for the VS2010 database project that I just skipped.

+6
visual-studio-2010 database-project datadude
source share
5 answers

I am sure there is no one!

May I ask why you need a table designer to create and modify script creation files for your new objects? Is there something that won't give you a constructor?

+3
source share

How I use the database project in VS2010:

  • Build everything with SQL Server Management Studio.
  • Sync it with my database project.
  • When I need to change something, do it in SQL Server Management Studio.
  • Use Schema Compar to synchronize the database design.
+1
source share

I just noticed that VS 11 Beta now includes a constructor, although it is rough around the edges (for example, you still need to enter relationships manually).

+1
source share

Wow ... I can’t believe that no one took the time to answer all this time. Here is an example of creating a script table with some simple limitations.

CREATE TABLE [User] ( UserID INT NOT NULL IDENTITY (1,1), UserName NVARCHAR(20) NOT NULL, UserPassword NVARCHAR(20) NOT NULL, EmailAddress NVARCHAR(50) NOT NULL, Location NVARCHAR(100), MobileNumber VARCHAR(10), CreatedDate DATETIME NOT NULL CONSTRAINT User_CreatedDate_DF DEFAULT (GETDATE()), CONSTRAINT User_UserID_PK PRIMARY KEY CLUSTERED (UserID), CONSTRAINT User_UserName_UQ UNIQUE (UserName), CONSTRAINT User_EmailAddress_CK CHECK (EmailAddress LIKE '%@%.%'), CONSTRAINT User_MobileNumber_CK CHECK (MobileNumber LIKE '[2-9][0-9][0-9][2-9][0-9][0-9][0-9][0-9][0-9][0-9]') ) 

You can use functions to embed in your control restrictions, but again, this is a simplified exaxmple.

0
source share

As I commented here , VS2010 link states that in

0
source share

All Articles