configure database connection during deployment

Thread is closed for posting
3 posts, 0 answers
  1. Jaimie
    Jaimie avatar
    33 posts
    Member since:
    Mar 2008

    Posted 19 Nov 2009 Link to this post

    hey.

    If i have a connection string for my asp.net website like this:

    <add name="MyConnectionString" connectionString="Data Source=10.0.0.1;Initial Catalog=testdatabase;User Id=test;Password=test" providerName="System.Data.SqlClient" />

    How could i configure the same thing for OpenAccess ORM?

     

      <openaccess xmlns="http://www.telerik.com/OpenAccess">  
        <references> 
          <reference assemblyname="test" configrequired="True" /> 
        </references> 
        <connections> 
            <connection id="DatabaseConnection1">  
              <databasename></databasename>  
              <servername></servername>  
              <integratedSecurity></integratedSecurity>  
    <connectionParams></connectionParams>      <backendconfigurationname>mssqlConfiguration</backendconfigurationname>   
    <user></user>  
    <password></password>         
            </connection> 
        </connections> 
      </openaccess> 

    Thanks 

     

  2. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 19 Nov 2009 Link to this post

    Hi Jaimie,

    The standard .NET connection strings are new to the Q3 release of Telerik OpenAccess ORM. You can change the approach of defining a connection string with OpenAccess now by just re-running the enable project wizard in your project.

    To achieve this goal you should do the following steps:
    1.    Run the Enable Project Wizard for the project
    2.    On the third step you should choose the Use standard connection strings(Web.config or App.config) option from the Connection Settings box
    3.    You could set up new connection by pressing the New Connection button and using the Connection Properties dialog
    4.    When you finish click on the Next button and then Done


    Sincerely yours,
    Damyan Bogoev
    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. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 19 Nov 2009 Link to this post

    Hello Jaimie,

    Please have in mind that the connection string name in your Web.config should match the OpenAccess connection id. If you want to keep the name from the web site ('MyConnectionString"), change the connection id from the App.config file of the class model project like this:
    <connection id="MyConnectionString">
    You should change the ConnectionId property of the project as well.
    It would be easier to change just the connection string name in the Web.config file if it is not used by any other code.

    Greetings,
    Alexander
    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