Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6965411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:03:29+00:00 2026-05-27T16:03:29+00:00

I am having a real problem, I created multiple users in sql server with

  • 0

I am having a real problem, I created multiple users in sql server with different dbroles, and now im trying to check what’s the user role in db and connect to a connection string depending on their role as this will be more secure….. how can I choose between different connection strings and pass it to the model.edmx, remember I am working with 3 tier design.

here is how my login control works:
http://i40.tinypic.com/nvz6lt.jpg

here is my connectionclass:
http://i39.tinypic.com/34qmybs.jpg

here is my app.config file:

http://i43.tinypic.com/6xq4q8.jpg

Thanks alot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:03:30+00:00Added an answer on May 27, 2026 at 4:03 pm

    There are multiple overloads for the ObjectContext constructor.

    The default one just takes the connectionstring with a matching name from the config file. But you can also use a constructor where you specify the connection string yourself.

    In your code you could maybe create a Authorization enum with values like BasicUser, Admin and pas that to your ConnectionClass. There you could do a switch and pick the right connection string from your config.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since long time i been having a real problem with the different ways that
Having real problems creating a DB on my version of SQL Server 2008 R2
I am having a real problem at work with a highly ingrained developer obsessed
Hi guys i've never written a comparator b4 and im having a real problem.
I'm having real problems getting PDO_MYSQL working. I started by just trying to install
First time cake user and I'm having real apache problems. For some reason the
I am having real trouble trying to get decent answers to my questions from
I am having a real headache trying to set a node's local position to
Having successfully gotten a sample program working, I'm now starting to do Real Work
I'm having a problem reading data from a text file into ms sql. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.