Click here to Skip to main content
15,894,291 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I am using c# winforms.now i developed one application. there are 4 user and 1 admin role is there. my doubt is how to give user rights to do insert and update operations from the admin role using sql tables

can u help me anyone???
Posted

You should go there-[Authenticating Users with Windows Authentication][^] to learn how to authenticate user with windows authentication.

Also have a look on CP article: Windows Authentication Using Form Authentication[^]

Also read a good answer on CP: Plz tell me what is windows authentication and difference between form authentication and windows authentication[^]
 
Share this answer
 
First you create two separate roles in SQL with the required permissions.

Next you need a way to differentiate between your users within SQL. This is normally done by controlling the user that is connecting to SQL.

You can use either windows credentials or SQL credentials for this.

With windows credentials the username from the operating system is passed through to SQL.

With SQL credentials you specify the username in the connection string.

You then need to add the appropriate users to the groups you created earlier.

This will stop users, at the SQL level, making changes they're not allowed to make.
 
Share this answer
 
Comments
Balasubramanian T 20-Jun-13 9:30am    
thank u for your fastest reply...

my Team Leader told to create one table with Action_name column. in this column put some operations like insert and update. then use check boxes to give rights...

these are all instructions. from this how can i complete it???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900