how to pass connection string to Telerik OpenAccess Domain Service

Thread is closed for posting
5 posts, 0 answers
  1. Jasmin
    Jasmin avatar
    3 posts
    Member since:
    Dec 2010

    Posted 30 Mar 2011 Link to this post

    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?

  2. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 04 Apr 2011 Link to this post

    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
  3. George Fryberger
    George Fryberger avatar
    6 posts
    Member since:
    May 2009

    Posted 02 Jun 2011 Link to this post

    Jasmin,

    I have pretty much the same challenge.  Were you ever able to find a way to handle this?
  4. Jasmin
    Jasmin avatar
    3 posts
    Member since:
    Dec 2010

    Posted 02 Jun 2011 Link to this post

    No, sorry. We have no solution yet.
  5. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 08 Jun 2011 Link to this post

    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.
Back to Top