We have the same database on multiple servers. How can I programmatically via a web app change connection on the fly to a different server. All databases have the same name and schema.
Thanks
1 Answer, 1 is accepted
0
Alexander
Telerik team
answered on 01 Dec 2010, 01:16 PM
Hello Ken,
You can use the constructor of the OpenAccessContext class which takes a connection parameter and pass a connection string or connection string name (if the connection string is itself present in the .config file). To switch to another server it is enough just to create a new context instance with the appropriate connection string. Here is an example: