Database Connections

6 posts, 0 answers
  1. John
    John avatar
    88 posts
    Member since:
    Nov 2007

    Posted 07 Jan 2009 Link to this post

    Just starting out looking into Open Access and have one question.  Can you over ride the database connection out side of the dll?

    When making a code library you set up a db connection.  But then when you deploy that dll into another project, is there a way to change that connection in say the web.config file?

    Will a connection string in the web.config file with the same name over ride the one made in app.config in the code library?  Or is this connection string always hard coded into the dll?


  2. Hessner
    Hessner avatar
    189 posts
    Member since:
    Mar 2003

    Posted 07 Jan 2009 Link to this post

    Hi John,

    Take a look at this new blog post.
  3. DevCraft banner
  4. John
    John avatar
    88 posts
    Member since:
    Nov 2007

    Posted 07 Jan 2009 Link to this post

    Ok, most excellent, this is exactly what I was wondering, this will make deploying without rebuilding the class library for multiple sites.  Thanks a bunch!
  5. Majid
    Majid avatar
    9 posts
    Member since:
    Dec 2008

    Posted 10 Feb 2009 Link to this post

    Hi Hessner
    I have read detail about setting the connection in BLOG but i am getting error "Connection 'DatabaseConnection' could not be found in config files.". Even i have provided the database id. This error occurs when i am deploying website in IIS. I have provided class mapping , database configuration and reference of DLL files also. Please can u help me. I am providing settings in web.config file.
    Thanks. 
  6. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 10 Feb 2009 Link to this post

    Hello Majid,

    please verify that the connection name is indeed 'DatabaseConnection' in the web.config file and not 'DatabaseConnection1' (which is the default).

    Greetings,
    Thomas
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Majid
    Majid avatar
    9 posts
    Member since:
    Dec 2008

    Posted 11 Feb 2009 Link to this post

    Hello Thomas
    It was same as in App.config. But i have solved it in other way. Thanks for reply.
Back to Top
DevCraft banner