This is a migrated thread and some comments may be shown as answers.

Evaluating before purchase - error when using

2 Answers 248 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Saif Khan
Top achievements
Rank 1
Saif Khan asked on 28 Mar 2011, 05:14 PM
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 Answers, 1 is accepted

Sort by
0
Saif Khan
Top achievements
Rank 1
answered on 28 Mar 2011, 07:40 PM

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

0
PetarP
Telerik team
answered on 30 Mar 2011, 05:08 PM
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
Tags
Data Access Free Edition
Asked by
Saif Khan
Top achievements
Rank 1
Answers by
Saif Khan
Top achievements
Rank 1
PetarP
Telerik team
Share this question
or