Evaluating before purchase - error when using

3 posts, 0 answers
  1. Saif Khan
    Saif Khan avatar
    3 posts
    Member since:
    Nov 2004

    Posted 28 Mar 2011 Link to this post

    When I run my app to fetch some data I get

    No metadata has been registered for class TelerikORM_Test.TelerikORM_Test.Mac_actlocmap. (This usually indicates, that either this class is not declared persistent or it is declared persistent but not enhanced. The class was loaded from ...

    Am I missing something?...My db is SQL Server 2000 and using VS2010. I followed the help file

    I am calling a view

     Dim vendors = From c In dbContext.VwVendorActiveDBs
                          Select c

            MsgBox(vendors.Count().ToString())



    Note: I dd not create a separate library project...I bundled everything in a Winform project.
  2. Saif Khan
    Saif Khan avatar
    3 posts
    Member since:
    Nov 2004

    Posted 28 Mar 2011 Link to this post

    Telerik Support

    You appear to have a wonderful product, really documented but honestly I simply couldn't get that *.ing thing working after 5 hours, even running through your docs and kb...

     1. I am using VS 2010, SQL Server 2000 and VB.NET on this project.
     2. I am trying to map and connect to a single view in the db to test.

    Here is my last error

    Invalid object name 'voa_keygen'. Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'voa_keygen'.
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.StatementImp.executeQuery(String sql)
       at OpenAccessRuntime.Relational.sql.HighLowRelationalKeyGenerator.IsCached(Connection con, RelationalKeyGeneratorInfoCache infoCache, String tab, String kCol, String vCol, String key, Boolean& ret)
       at OpenAccessRuntime.Relational.sql.HighLowRelationalKeyGenerator.init(String className, RelationalTable theClassTable, Connection con, RelationalKeyGeneratorInfoCache relationalKeyGeneratorInfoCache)
       at OpenAccessRuntime.Relational.RelationalStorageManagerFactory.init(Boolean full)

    Here are others

    +  Thrown: "Mapping for class 'MacolaImportManager.MacolaImportManagerLibrary.VwVendorActiveDB' is specified in file 'config' but the class could not be found. --> MacolaImportsDomainModel/namespace[MacolaImportManager.MacolaImportManagerLibrary]/class[VwVendorActiveDB]" (Telerik.OpenAccess.Exceptions.MetadataException) Exception Message = "Mapping for class 'MacolaImportManager.MacolaImportManagerLibrary.VwVendorActiveDB' is specified in file 'config' but the class could not be found. --> MacolaImportsDomainModel/namespace[MacolaImportManager.MacolaImportManagerLibrary]/class[VwVendorActiveDB]", Exception Type = "Telerik.OpenAccess.Exceptions.MetadataException"

    +  Thrown: "Mapping for class 'MacolaImportManager.MacolaImportManagerLibrary.VwVendorActiveDB' is specified in file 'config' but the class could not be found. --> MacolaImportsDomainModel/namespace[MacolaImportManager.MacolaImportManagerLibrary]/class[VwVendorActiveDB]" (Telerik.OpenAccess.Exceptions.MetadataException) Exception Message = "Mapping for class 'MacolaImportManager.MacolaImportManagerLibrary.VwVendorActiveDB' is specified in file 'config' but the class could not be found. --> MacolaImportsDomainModel/namespace[MacolaImportManager.MacolaImportManagerLibrary]/class[VwVendorActiveDB]", Exception Type = "Telerik.OpenAccess.Exceptions.MetadataException"

    An unhandled exception of type 'Telerik.OpenAccess.Exceptions.DataStoreException' occurred in Telerik.OpenAccess.Runtime.dll

    Additional information: Invalid object name 'voa_keygen'. Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'voa_keygen'.
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.StatementImp.executeQuery(String sql)

      Exception Message "Invalid object name 'voa_keygen'." 

    An unhandled exception of type 'Telerik.OpenAccess.Exceptions.DataStoreException' occurred in Telerik.OpenAccess.Runtime.dll

    Additional information: Invalid object name 'voa_keygen'. Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'voa_keygen'.
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.StatementImp.executeQuery(String sql)

      Exception Message "Invalid object name 'voa_keygen'." 



    All I wish is to test before I purchase. If not, can you answer

    1. Can I use the ORM against SQL Server 2000?
    2. Can I use it against Views in DB?
    3. Can I use it against objects in DB (including views) which does not have primary keys

    Thank you

  3. DevCraft banner
  4. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 30 Mar 2011 Link to this post

    Hello Saif Khan,

     The error you are seeing is because OpenAccess always needs to associate its persistent types with a primary key. If such is not supplied we use our internal mechanism for creating IDs. This mechanism relies that a certain table (voa_keygen) is present in your database. If the table is not present you will see the exception you have encountered. To create it you can just execute our Update Database From Model wizard that will add it to your database and you will be able to continue your work. Now to your questions:
    1. Yes, OpenAccess supports Microsoft SQL Server 2000.
    2. Yes you can use it against view, however you are not able to create views (only creating tables is supported) with OpenAccess.
    3. While you can have tables and views without a primary key, OpenAccess will always require one. In that case you will have to either let open access use its internal mechanism to create a primary key for you or you can just mark one(or multiple) fields from your table/view for OpenAccess to recognize as primary keys (even though they are not such in the database).

    Best wishes,
    Petar
    the Telerik team
Back to Top