Visual Studio MVC Model/Database connection problem RRS feed

  • Question

  • I am using a VMWare virtual machine on which

    1) Is running Windows

    2) I have administration rights

    3) Has SQL Server 2008 and Visual Studio 2010 installed

    I am trying to create an ASP.NET MVC application model first.

    I get as far as creating a new model, ADO.NET Entity Data Model.

    This launches the Entity Data Model Wizard

    I create an empty model, Add Entities to it.

    Then select Generate Database from Model which launches the Generate Database wizard


    1) The list of servers is empty. I have to type in localhost.

    2) When I type it in, I can see all the databases. I enter a name for the new database, using windows authentication

    I get a message the database does not exist or I do not have permission to see it. Do I want to create it? Yes.

    So far, so good.Then it all goes wrong

    The .sql is created. But it shows as not connected.

    The dataconnection shows in the Server Explorer, but is not connected.

    The database has been created on the server, but the table has not.

    If I click in the Server Explorer I can connect to the database, but it has no table.

    Since I am using Windows Authentication, and my virtual machine user name has administration rights in SQL Server and Visual Studio, why can I not connect? Why is VS allowed to create a database but then not add a table to it?

    What am I likely to be doing wrong?


    Monday, May 21, 2012 10:16 AM