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

  • SEARCH
  • Home
  • 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 8906531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:40:49+00:00 2026-06-15T02:40:49+00:00

I developed a small C# utility that performs data verification, clean up and export.

  • 0

I developed a small C# utility that performs data verification, clean up and export. Now I am writing a manual for users and I would like to simulate the situation where users might not have enough rights to perform certain database operations (SELECT or UPDATE) on particular tables.

The utility is very small and just relies on current user’s Windows credentials by using the trusted connection to the database, this means it uses the credential of my Windows account that are propagated from AD. I have full rights on the database server, but I can’t revoke some rights from myself or map my login to another database user with less rights, because my login is already mapped to dbo and I can’t unmap it (the error message “dbo user cannot be dropped” comes if I try it).

So, how can I simulate the lack of necessary rights for my utility?

  • 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-06-15T02:40:51+00:00Added an answer on June 15, 2026 at 2:40 am

    You could create and throw a SqlException within your tests to simulate the condition of not having rights to perform a certain action.

    You’ll need to use some reflection (check this out for a helper class) to get the proper errors added to the Errors property of the exception.

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

Sidebar

Related Questions

I have developed a small view that contains special char like 'é' and when
I am writing a desktop utility application to manage a small set of data.
I developed a small nifty webserver in C and would like to evaluate its
I developed small CakePHP application, and now I want to add one more table
Hi i developed small web application, in that all the functionality working fine but
I have developed a small application and now i want to protect it. I
I developed a small soap client to update product data on magento. So far
I have developed a small server that recives connections (using basically the example here:
I have developed a small iPhone application by using singleton that I use to
i've developed small web app for personal use with Ruby on Rails. Now when

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.