none
entity data model not working in VS 2008 with SQL Server 2000 RRS feed

  • Question

  • Hi,

    I'm trying to get the entity data model to work in VS 2008 using SQL Server 2000 but the wizard does not kick in when the .mdf is dragged/dropped onto the project in VS.  Do I need more recent versions of VS & SQL Server to get this to work and if so which combination of versions are needed?  If this is something other than a software version problem please advise what to do to get it to work.

    Thanks, knot

    • Moved by Alexander Sun Tuesday, September 27, 2011 2:49 AM EF issue (From:Visual Studio Setup and Installation)
    Saturday, September 24, 2011 7:11 PM

Answers

All replies

  • Hi Knot,

    Since you are using VS2008, it should work fine to add SQL Server 2000 database into Entity Framework Entity Data Model during VS design time.   Could you please let us know what do you mean by the Entity Data Model wizard kicks in when the .mdf file is dragged/dropped into the project?   Do you mean by the wizard pops up to let you add data source?   Anyway, we can add the model by the normal way, http://msdn.microsoft.com/en-us/library/bb399247(v=VS.90).aspx.  

    Besides, for VS2010 design time, it's not supported to connect SQL Server 2000 database.  But EF4 runtime still supports to connect SQL Server 2000 databases, http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/781d7256-8226-4e56-a1aa-16ca33e1cbe7.

    Good day!

    Thanks


    Michael Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, September 26, 2011 4:21 PM
    Moderator
  • Hi Michael,

    Thank-you for your reply.  To let you know what I mean by the Entity Data Model wizard kicking in when the .mdf file is dragged/dropped onto the project I reviewed the behavior I'm seeing in VS2010 versus VS2008.  Here are the screen by screen details:

    VS2010

    1. drag/drop .mdf onto project
    2. box pops up that says - Data Source Configuration Wizard: Choose a Database Model; choices are Dataset or Entity Data Model
    3. pick Entity Data Model
    4. box pops up that says - Entity Data Model Wizard: Choose Model Contents; choices are Generate from databas or, Empty model
    5. pick Generate from Database
    6. other screens follow...

    VS2008
    1. drag/drop .mdf onto project
    2. box pops up that says - Data Source Configuration Wizard: Choose Your Database Objects; choices are a series of check boxes with these selections next to them: Tables, Views, Stored Procedures, Functions

    As you can see the behavior is different after the .mdf drag/drop.  My goal is to be able to use Entity Data Model in Visual Studio.  I can see two possible options at this point:

    a) find out how to get an Entity Data Model set up in VS2008  OR

    b) install VS2010

    My preference would be to go with option a).  That said, do you have any ideas about how to get VS2008 to build an Entity Data Model that is the same as what VS2010 would create?

    Thanks, knot


    • Edited by Knot Wednesday, September 28, 2011 1:34 AM
    Wednesday, September 28, 2011 1:34 AM
  • Hi Knot,

    The behavior is different from VS2008 and VS2010 when we drag/drop .mdf files into VS solutions.   It would be hard to change the behavior in VS2008 to make it the same as VS2010, however, we can also add Entity Data Model as Data Source in VS2008 through another way (not when we drag/drop .mdf files). 

    For detail, please see this MSDN document, http://msdn.microsoft.com/en-us/library/cc716712(v=vs.90).aspx.   Does this meet your request? 

    If you have any questions, please feel free to let me know.

    Good day!

    Thanks


    Michael Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Wednesday, September 28, 2011 1:48 AM
    Moderator