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

using only stored procedures and no persistent classes

1 Answer 110 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bill
Top achievements
Rank 1
Bill asked on 22 Nov 2009, 11:23 AM

Hi,

I do not want to use persistent classes. I only want to use custom stored procedures and have the orm use them. I have a DataAccess.dll assembly and  have used the orm tool to create the StoredProcedure.vb class which has static wrappers to all of my custom stored procedures. I have the DataAccess.dll assemblies app.config set as an imbedded resource.

I have a wpf application setup to use the orm assemblies and it has adjusted the app.config file. The wpf application references the DataAccess.dll file and it compiles with no errors. However, when I run the project, I get the following error:

Telerik.OpenAccess.Exceptions.InvalidOperationException was unhandled
  Message="No persistent class could be found.\r\nTo define persistent classes use the [Persistent] attribute at the class level.\r\nIf multiple projects are used additional references must be made in the configuration file.\r\nTo update the required references use 'Update Config References' from the OpenAccess menu."
  Source="Telerik.OpenAccess"
  CanRetry=true

How do I configure my DataAccess.dll assembly and my wpf application to not use persistent classes and only use the orm to use custom stored procedures. Again, I do not want to use any persistent classes, I only want to use custom stored procedures that are wrapped in the StoredProcedure.vb class.

Bill

1 Answer, 1 is accepted

Sort by
0
Accepted
PetarP
Telerik team
answered on 23 Nov 2009, 02:11 PM
Hello Bill,

The problem comes from that Telerik OpenAccess ORM needs persistent classes to operate. Currently having no persistent classes in an enhanced project is not supported. The workaround would be to create a dummy class and mark it as persistent. Remember to set the Update database property of your project to false as you do not want this dummy class to end up in your database.

Best wishes,
Petar
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Bill
Top achievements
Rank 1
Answers by
PetarP
Telerik team
Share this question
or