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

configure database connection during deployment

2 Answers 62 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.
Jaimie
Top achievements
Rank 1
Jaimie asked on 19 Nov 2009, 07:52 AM
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 Answers, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 19 Nov 2009, 02:12 PM
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.
0
Alexander
Telerik team
answered on 19 Nov 2009, 02:20 PM
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.
Tags
General Discussions
Asked by
Jaimie
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Alexander
Telerik team
Share this question
or