Driver for SQL Server CE 4.0 for Entity Framework

Отвечено Driver for SQL Server CE 4.0 for Entity Framework

  • 24. ledna 2011 8:26
     
     

    Hi

    sorry if this is a dummy question, but I was trying to use the new SQL Server CE 4 database in a VS 2010 SP 1 project. I installed VS2010 SP1 and the Tooling support for SQL Server CE 4. I can create a database and IO can connect to the DB via Server Explorer. Unfortunately when I try to access the DB with the Entity Framework designer ( specifically I try to generate the model from the DB). The Entity Framework designer does not show the SQL CE Framework 4.0 driver in the List of supported connections. 

    Is there anything I am missing?

     

    Thanks for any help.

     

Všechny reakce

  • 24. ledna 2011 12:17
    Moderátor
     
     Odpovědět

    There is nothing you are missing, and you have all the required software, but the EDM Wizard only supports version 4 directly in Web Projects, as noted in this blog post: http://blogs.msdn.com/b/sqlservercompact/archive/2011/01/12/microsoft-sql-server-compact-4-0-is-available-for-download.aspx 

    You can use the workarounds I describe here: http://erikej.blogspot.com/2010/11/using-entity-framework-with-sql-server.html

    or generate the EDMX in a web project and move it to a Class Library / Windows project.


    Visit my SQL Compact blog - http://erikej.blogspot.com - Please mark as answer, if this was it.
    • Označen jako odpověď HolgerSchade 24. ledna 2011 16:18
    •  
  • 24. ledna 2011 16:18
     
     

    Thanks,

    aou are right I was not targeting a WebProject. I was trying to use it in an Outlook Add-In. Thanks for the workaround. I will try to do this.

     

  • 15. února 2011 20:46
     
     

    is this an example of good planning at MS?

    why hasn't the tooling been provided to support the otherwise excellent sqlce 4?

    having to install vs2010 sp1 AND use the 'workaround' projects...what guff

  • 19. února 2011 15:58
    Moderátor
     
     

    Some features are not enabled in version 4.0 (like replication/sync), and therefore the tendency to "stick" with 3.5 for desktop projects - see this blog post from the team: http://blogs.msdn.com/b/sqlservercompact/archive/2011/01/12/microsoft-sql-server-compact-4-0-is-available-for-download.aspx 

    (In particular the heading: Scenarios not enabled by SQL Server Compact 4.0)


    Visit my SQL Compact blog - http://erikej.blogspot.com - Please mark as answer, if this was it.
  • 22. února 2011 20:51
     
     

    can anyone representing MS explain the logic of not providing standard designer support for sqlce 4 in vs2010?

    workarounds!  the emporer has no clothes!

  • 23. února 2011 8:19
    Moderátor
     
     
    Explanation here:  http://blogs.msdn.com/b/sqlservercompact/archive/2011/01/12/microsoft-sql-server-compact-4-0-is-available-for-download.aspx
    Visit my SQL Compact blog - http://erikej.blogspot.com - Please mark as answer, if this was it.
  • 11. dubna 2012 4:13
     
     

    Dear HolgerSchade,

    There is a much more easyer way to get your MS SQL CE4 database in entity object in your windows forms or class library.

    1. Install SP 1 for VS 2010

    2. Install MS SQL CE 4 Toolkit for VS 2010

    3. In VS click View -> Server Explorer

    4. In Server Explorer panel right click on Data Connections, select Add Connection

    5. In the Add Connection window change provider to MS SQL Server Compact 4.0, select your database and set password, press OK

    6. In Server Explorer click on Open SQL Server Compact Toolbox at the top of the Server Explorer panel

    7. In appeared window right click on your connection and click Add Entity Data Model to current Project

    8. In appeared window enter entity name and select tables and objects from database you need and click OK

    VIOLA! - you have entity object with SQL CE 4 in your project.

    Hope this helps. :)



  • 10. května 2012 0:26
     
     
    Amazing, thanks for the tip !!!!
  • 9. srpna 2012 5:25
     
     

    Hi friends,

    I have installed Visual Studio 2010 and after that i downloaded SQL Server CE 4.0 and Installed to My PC.

    But I have a problem that, 

    When I am opening Add Connection from Server Explorer, SQL Server CE 4.0 does not Display in Choose Data Source Dialog Box.

    It shoes only SQL Server CE 3.5 and other option even though i have installed SQL Server CE 4.0.

    What is i ma missing ? Please Help.


  • 9. srpna 2012 6:23
    Moderátor
     
     
    You must install VS 2010 SP1 and also the SQL Server Compact Tools for 4.0 / VS 2010 SP1.

    Please mark as answer, if this was it. Visit my SQL Server Compact blog