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

how to pass connection string to Telerik OpenAccess Domain Service

4 Answers 151 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.
Jasmin
Top achievements
Rank 1
Jasmin asked on 30 Mar 2011, 09:45 PM

We are developing a Silverlight 4 web application using Telerik OpenAccess ORM to access a DB, via Telerik OpenAccess Domain Service.

Note: connection string cannot be stored in the web.config.

In our application, every user has his own connection string dynamically generated by user credentials.

We have a login form on the Silverlight client side, and the connection string will be created after user login.

How do we  pass this connection string from the client to the server side, and then call service to access DB?

4 Answers, 1 is accepted

Sort by
0
PetarP
Telerik team
answered on 04 Apr 2011, 04:46 PM
Hi Jasmin,

Our data services implementation invokes the default constructor of your context class. If you look into the generated code for your context you will see that a connection name is passed there. The only way would be to find a way and append a temporary connection string to the config file with the same name that is being passed to the context itself. This way the data services will pick it up and work with it.

Best wishes,
Petar
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
George Fryberger
Top achievements
Rank 1
answered on 02 Jun 2011, 05:18 PM
Jasmin,

I have pretty much the same challenge.  Were you ever able to find a way to handle this?
0
Jasmin
Top achievements
Rank 1
answered on 02 Jun 2011, 07:45 PM
No, sorry. We have no solution yet.
0
PetarP
Telerik team
answered on 08 Jun 2011, 03:03 PM
Hello Jasmin,

 The only possible solution would be to modify the xml dynamically. You will have to replace or add a new connection string that will use the same name. This way our runtime will be able to pick it up and work with it.

All the best,
Petar
the Telerik team
Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
Tags
General Discussions
Asked by
Jasmin
Top achievements
Rank 1
Answers by
PetarP
Telerik team
George Fryberger
Top achievements
Rank 1
Jasmin
Top achievements
Rank 1
Share this question
or