Unable to update model from SQL Server CE DB

5 posts, 0 answers
  1. Jim
    Jim avatar
    2 posts
    Member since:
    Dec 2013

    Posted 04 Jan 2014 Link to this post

    Hi I am using SQL Server CE 3.5 with Visual Studio 2010 SP1 and whenever I try to update the model using the Update from Database command in the designer Interface I get an error message: Unable to retrieve the database scheme information: Reason Could not load type System.Data.SqlServerCe.SqlCeException from assembly Microsoft.SqlServerCE.Client version 3.5 ....... see link below for screen shot. When I try to cancel out of the popup window I get a second popup displaying an error message.

    http://i41.tinypic.com/ng9j5d.png

    I really wanted to use Firebird Embedded but the SQL generated by OpenAccess was not compatible with Firebird for some reason the table name was not recognize. So now that I have switched to SqlServerCE I have this problem. Been fighting with OpenAccess for a week now and still no progress. Is there an easy solution to this problem?

    Thank you for your help.
  2. Boris Georgiev
    Admin
    Boris Georgiev avatar
    190 posts

    Posted 08 Jan 2014 Link to this post

    Hello Jim,

    It seems that there is version mismatch between the SqlServerCe.Client assembly, the Net Framework version of your project and SqlServerCe provider version which is set in the connection string in the app.config file. Any mismatch between two of these versions could cause this error.

    I hope that helps. If this is not the cause of the problem or you have other troubles, do not hesitate to contact us again. 

    Can you share more information about the problem which you experienced with Firebird and Telerik OpenAccess ORM?

    Regards,
    Boris Georgiev
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  3. DevCraft banner
  4. Jim
    Jim avatar
    2 posts
    Member since:
    Dec 2013

    Posted 08 Jan 2014 Link to this post

    Hi Boris,

    Thank you for the reply. The connection string was generated by OpenAccess and yes it was off by a minor version.

    As for Firebird. I was using Firebird embedded 2.5. Originally, I used the 2.1 version but upgraded when the error occurred.

    See the following for the error. I removed the code but still had this error saved. I am using LINQ for the query. Below was an Any<>() query returning a bool and I also  tried a standard LINQ Select query returning a List<>(). I received the same error for both. Querying a different table yielded the same error. Running the generated query against the DB in the query builder yielded a working result after a slight reformat of the generated SQL.

    An exception occured during the execution of 'Extent<Dash.DAL.PROFILE>().Where(p => (p.PROFILE_NAME == value(Dash.Client.BizObjects.ProfileManager+<>c__DisplayClass0).InProfileName))'. Failure: Count(*) query failed: Telerik.OpenAccess.RT.sql.SQLException: Dynamic SQL Error
    SQL error code = -204
    Table unknown
    PROFILE
    At line 1, column 165
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery(Nullable`1 commandTimeout)
       at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery(Nullable`1 commandTimeout)
       at OpenAccessRuntime.Relational.RelationalStorageManager.executeCount(RelationalCompiledQuery cq, QueryParameters parameters)
    SELECT COUNT(1) FROM ( SELECT a."PROFILE_ID" AS COL1, a."ACTIVE" AS COL2, a."CREATE_DATE" AS COL3, a."LAST_UPDATE" AS COL4, a."PROFILE_NAME" AS COL5 FROM "PROFILE" a WHERE a."PROFILE_NAME" = ?                                        ) AS TMP_COUNT
    (set event logging to all to see parameter values) Telerik.OpenAccess.RT.sql.SQLException: Dynamic SQL Error
    SQL error code = -204
    Table unknown
    PROFILE
    At line 1, column 165
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery(Nullable`1 commandTimeout)
       at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery(Nullable`1 commandTimeout)
       at OpenAccessRuntime.Relational.RelationalStorageManager.executeCount(RelationalCompiledQuery cq, QueryParameters parameters)
    See InnerException for more details.
    Complete Expression:
    .Call System.Linq.Queryable.Where(
        .Constant<Telerik.OpenAccess.Query.ExtentQueryImpl`1[Dash.DAL.PROFILE]>(Extent<DAL.PROFILE>()),
        '(.Lambda #Lambda1<System.Func`2[Dash.DAL.PROFILE,System.Boolean]>))
    .Lambda #Lambda1<System.Func`2[Dash.DAL.PROFILE,System.Boolean]>(Dash.DAL.PROFILE $p) {
        $p.PROFILE_NAME == .Constant<Dash.Client.BizObjects.ProfileManager+<>c__DisplayClass0>(Dash.Client.BizObjects.ProfileManager+<>c__DisplayClass0).InProfileName
    }
  5. Boris Georgiev
    Admin
    Boris Georgiev avatar
    190 posts

    Posted 13 Jan 2014 Link to this post

    Hi Jim,

    Unfortunately Telerik OpenAccess ORM is not tested against Firebird Embedded version 2.5 and doesn't fully supported this backend. Also we doesn't have test environment for this Firebird database so we couldn't reproduce this issue.

    I am sorry for the inconvenience caused.

    Regards,
    Boris Georgiev
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  6. JP
    JP avatar
    1 posts
    Member since:
    Jul 2012

    Posted 21 Sep in reply to Boris Georgiev Link to this post

    Dear Boris,

     

    i have the same problem when creating a domain model it does not even display the connection string so i add it manually like so:

    Data Source=C:\Projects\IMS Multi Tenant\IMS Data.core\Core.sdf;Password=jpsk2299#@;

    i am trying to target a sql compact 4.0 but it keep give the error :

    Could not load type System.Data.SqlServerCe.SqlCeException from assembly Microsoft.SqlServerCE.Client version 3.5

    I have sqlserver compact edition 4.0 installed and latest q1 2015 of the telerik orm

    How can i get this to work??

     

    thanks for your help

Back to Top
DevCraft banner