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

Enable Project Wizard doesn't show Database options

5 Answers 87 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.
Matthew Techmeier
Top achievements
Rank 1
Matthew Techmeier asked on 09 Oct 2009, 01:56 PM
As the title says, when I enable an ASP.NET application for openaccess, I do not get the option to configure the database.

I was following the steps in the tutorial. I get the first two screens, it creates the entries in the web.config and creates the provider, but I get no option for the database. And all the options are greyed out for doing anything, including Forward and Reverse mapping etc. When I try to reverse map, I get an error about no DatabaseConnection1 entry exists.

Is there something I am missing?

Edit: I uploaded my screenshots to show what options I do get.

5 Answers, 1 is accepted

Sort by
0
Semo
Telerik team
answered on 09 Oct 2009, 05:58 PM
Hello Matthew,

You are not allowed to configure the database from your ASP.NET web application project. You need to create a Class library project first and to start the “Enable project to use ORM” wizard for that project. On the second dialog check both checkboxes and on the next one you will be able to configure your database settings. Then you can create (in case you didn’t done it yet) an ASP.NET web application project. After creating a reference from that web project to your Class library project you can start the “Enable project to use ORM” wizard for it as well.

What I briefly described is explained in more detail on this page.

I hope I was helpful.

Regards,
Semo
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.
0
Matthew Techmeier
Top achievements
Rank 1
answered on 09 Oct 2009, 07:06 PM
Yes, I can complete those steps. And I can get the application to run, however when the wizard runs I never get an option for the database configuration.

Once I have enabled it I have to then manually open up my Provider class and enter the database name I want to use from the attached library as it still says "DatabaseConnection1".
0
Semo
Telerik team
answered on 12 Oct 2009, 03:56 PM
Hello Matthew Techmeier,

You can configure your database options by running the enable project wizard on your Class-Library project that contains your persistent classes.

“DatabaseConnection1” is the default connection name (or connection id) and not your database name. You can type in your database name on the third page of the wizard in the text field at the bottom. Another way to do it is using the <database> tag in the App.config file of your Class library project.

Please let us know if you still have problems setting a connection to a database using our tool.

Sincerely yours,
Semo
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.
0
Matthew Techmeier
Top achievements
Rank 1
answered on 12 Oct 2009, 04:09 PM
Yes that I can do.

When I use this library in a web app, I do not get a third page in the wizard where I can choose the database name. I have to manually alter the Provider class that it creates to use the database name I gave in the class library where my persistant classes are.

All the documentation I read states that even when you add a reference to the class library you should still get a third page in the wizard where you can state the database connection. I do not get this option.
0
Semo
Telerik team
answered on 13 Oct 2009, 02:19 PM
Hello Matthew,

We recreated the situation you describe in your posts. You are right that the ObjectScopeProvider has to be altered manually for now.

In the mean time you can use the default database connection name if you don’t want to do the changes manually.

Sincerely yours,
Semo
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
Matthew Techmeier
Top achievements
Rank 1
Answers by
Semo
Telerik team
Matthew Techmeier
Top achievements
Rank 1
Share this question
or