Enable Project Wizard doesn't show Database options

Thread is closed for posting
6 posts, 0 answers
  1. Matthew Techmeier
    Matthew Techmeier avatar
    3 posts
    Member since:
    Aug 2009

    Posted 09 Oct 2009 Link to this post

    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.
  2. Semo
    Admin
    Semo avatar
    6 posts

    Posted 09 Oct 2009 Link to this post

    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.
  3. Matthew Techmeier
    Matthew Techmeier avatar
    3 posts
    Member since:
    Aug 2009

    Posted 09 Oct 2009 Link to this post

    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".
  4. Semo
    Admin
    Semo avatar
    6 posts

    Posted 12 Oct 2009 Link to this post

    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.
  5. Matthew Techmeier
    Matthew Techmeier avatar
    3 posts
    Member since:
    Aug 2009

    Posted 12 Oct 2009 Link to this post

    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.
  6. Semo
    Admin
    Semo avatar
    6 posts

    Posted 13 Oct 2009 Link to this post

    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.
Back to Top