OA / VS2010 / SQL CE 4.0 Error?

3 posts, 0 answers
  1. Brian Azzi
    Brian Azzi avatar
    65 posts
    Member since:
    Mar 2010

    Posted 14 Feb 2013 Link to this post

    Hey guys... I'm really new to OA & am trying to get a feel for using it in a simple situation with a small web app & a local SQL CE 4.0 database.

    I've set up a basic model in my project, and have loaded it from the DB (which has one simple table). This all looks fine, and I can then proceed and add an OpenAccess LINQ DataSource. 

    Great, looks like I'm setup. : )   Now here is my problem:

    If I go to the EntityModel (I just called it that by default), in the OA Model Explorer I can right click on the model and choose to "Update from Database...". When I do this, the OA dialog comes up but contains the following error every time (in the Choose Schemas dialog):

    "Unable to retrieve the database schema information. Reason: Could not load type 'System.Data.SqlServerCe.SqlCeException' from assembly 'Microsoft.SqlServerCe.Client, Version=, Culture=neutral...." etc. etc.

    This appears to indicate that it's trying to use the 3.5 assemblies rather than 4.0? (I didn't install SQL CE 3.5 at all)...

    So.. to update my schema, I've had to recreate the entire EntitiyModel each time (not very ideal).

    Any ideas?


    (p.s.-> Let me know if this would be better served as a direct ticket but I wanted to post it to the community for any new people like me that may run into this issue).
  2. Brian Azzi
    Brian Azzi avatar
    65 posts
    Member since:
    Mar 2010

    Posted 14 Feb 2013 Link to this post

    Very Quick Update:

    Of course as soon as I post... I found that i just needed to change my web.config to point to 4.0 instead of 3.5:


    I'm still not entirely sure why OA created the connection string as 3.5 based... but this seemed to fix my problem.

    : )


    Hmm... no matter what I do, when I use the Telerik menu to create the EntityModel, it always adds Telerik.OpenAccess.35.Extensions (not 4.0)... is this correct? (Along with Telerik.OpenAcess.Web.40). If I manually add the 4.0 extensions assembly, then I get compile errors.

    Also the OA designer wizards always seem to do their best to revert my connection string back to using SQL CE 3.5, NOT 4.0... which is where I get all these exceptions being generated.
  3. DevCraft banner
  4. PetarP
    PetarP avatar
    754 posts

    Posted 20 Feb 2013 Link to this post

    Hi Brian,
    even if the CE4.0 sounds like it is a .NET 4.0 only assembly, that is not true. You can use it in 3.5 or 4.0 applications. Only the EF part (what we do not use) is .NET 4.0 only.

    The OpenAccess 3.5 extensions assembly contains mainly our Linq implementation, it has to be used in 3.5 and 4.0 application. In our current release the 4.0 assembly contains only our Data service v1 implementation and my best guess is that you don't need it referenced.

    All the best,
    the Telerik team
    Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
Back to Top