This question is locked. New answers and comments are not allowed.
G'Day,
We are rolling out an upgraded version of our CMS using Telerik OpenAccess.
In part of this package is a setup routine, which accepts a new database connection string. Setup connects to the new database, creates all the database objects (using scripting) then connects using OpenAccess to populate the tables.
We are changing the Telerik connection string programmatically. Problem is, Telerik appears to be caching the old connection string (ie. the one in web.config at the time website is loaded). Web.Config snippit below:
Could you please advise how to override the database that Telerik is using. I have attempted to look at connectionpools of the backend configuration for the scope provider but there appears to be no way to override the connection.
Note that this line fails to use the new connection string:
Appears to be caching the original connection string.
What am I doing wrong? Has anybody attempted to do this?
Thank You,
James
We are rolling out an upgraded version of our CMS using Telerik OpenAccess.
In part of this package is a setup routine, which accepts a new database connection string. Setup connects to the new database, creates all the database objects (using scripting) then connects using OpenAccess to populate the tables.
We are changing the Telerik connection string programmatically. Problem is, Telerik appears to be caching the old connection string (ie. the one in web.config at the time website is loaded). Web.Config snippit below:
<
connectionStrings
>
<
add
name
=
"MainConnection"
connectionString
=
"Packet Size=4096;Data Source='(local)'; Initial Catalog='EITCMS_TEST6';User Id='eitcms';Password='eitcms';Persist Security Info=False;"
/>
</
connectionStrings
>
<
openaccess
xmlns
=
"http://www.telerik.com/OpenAccess"
>
<
references
>
<
reference
assemblyname
=
"EITCMS.DataAccess"
configrequired
=
"True"
/>
</
references
>
</
openaccess
>
Could you please advise how to override the database that Telerik is using. I have attempted to look at connectionpools of the backend configuration for the scope provider but there appears to be no way to override the connection.
Note that this line fails to use the new connection string:
theEITCMSObjectScopeProvider._myDatabase = Telerik.OpenAccess.Database.Get("MainConnection")
Appears to be caching the original connection string.
What am I doing wrong? Has anybody attempted to do this?
Thank You,
James