SQL database users/roles

N

nologo

hi all, is it possible to Incorporate the database users/roles element
in my c# application?
i'm trying to restrict areas of the application for certain users..if
i could put these users into a role and then call that role only
allowed to access this area - that would be perfect.
 
D

DeveloperX

hi all, is it possible to Incorporate the database users/roles element
in my c# application?
i'm trying to restrict areas of the application for certain users..if
i could put these users into a role and then call that role only
allowed to access this area - that would be perfect.

You can use Microsoft.SQLServer.SMO which is the SQL Server management
objects. Alternatively wrap a call to sp_helprolemember which will
give you a list of which users are in which roles. After that Mr
Arnolds suggestion of using custom Principal is a good one, just make
your implementation return info based on what you queried using the
either SMO or the SP above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top