On 19 Feb, 09:23, nologo <zel...@hotmail.comwrote:
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.