This question is locked. New answers and comments are not allowed.
Hi,
This is a "small" issue, but worth while dealing with.
One problem with development and then later deployment to a test system and finally to production, is that the database connection strings will (may) be different in each case.
In my projects, I have got into the habit of using a separate file to hold connection strings, and refer to that file using the "configSource" directive.
So for example in my web.config instead of a <conenctionStrings section with all the strings embdeded I simply code the following:
Then I create a separate file called connection.config which holds the actual connection data.
Then when I deploy to different environments, I don't deploy the "development" conneciiton.config file instead the file of that name in each environment already has the correct values for that environment.
and put my actual connection data into the file "connectionOA.config" as follows:
am not sure why I have to repeat the <openaccess ...> tags, whether they are there or not it all works, but visual studio does compain without them.
FIrstly it would be nice if you could arrange that the connection data was the same as for the rest of the project (i.e. connectionStrings her than connections). That way I only need the one file of connection info.
Secondly, if I run the Open Access -> Configuration -> Check Settings it complains saying
Which is of course not true since there is a <connections> section - it is just not as the checker expects. So it woudl be nice if this were to run cleanly (not a major issue, but tidyness is a good thing).
This is a "small" issue, but worth while dealing with.
One problem with development and then later deployment to a test system and finally to production, is that the database connection strings will (may) be different in each case.
In my projects, I have got into the habit of using a separate file to hold connection strings, and refer to that file using the "configSource" directive.
So for example in my web.config instead of a <conenctionStrings section with all the strings embdeded I simply code the following:
<connectionStrings configSource="connection.config" /> |
<connectionStrings> |
<remove name="LocalSqlServer" /> |
<add name="XXXConnection" connectionString="Data Source=SERVERNAME;Initial Catalog=DATABASENAME;Integrated Security=True" providerName="System.Data.SqlClient" /> |
</connectionStrings> |
I use the same "trick" with OA, in the section <openaccess>, I replace the <connections> ..... </connections> with:
<connections configSource="connectionOA.config" /> |
<openaccess xmlns="http://www.telerik.com/OpenAccess"> |
<connections configSource="connectionOA.config"> |
<connection id="MADConnection"> |
<databasename>MAD_Live</databasename> |
<servername>Andy-i7-PC\ENTERPRISE2008</servername> |
<integratedSecurity>True</integratedSecurity> |
<backendconfigurationname>mssqlMADConfiguration</backendconfigurationname> |
</connection> |
</connections> |
</openaccess> |
FIrstly it would be nice if you could arrange that the connection data was the same as for the rest of the project (i.e. connectionStrings her than connections). That way I only need the one file of connection info.
Secondly, if I run the Open Access -> Configuration -> Check Settings it complains saying
Validator :
<connections> section
Description :
'Connections' node not present in config file.
Which is of course not true since there is a <connections> section - it is just not as the checker expects. So it woudl be nice if this were to run cleanly (not a major issue, but tidyness is a good thing).