Getting SQL Sever User Role Information 
Author Message
 Getting SQL Sever User Role Information

Hello
in my vb project i want to enable disable menus depending on the user
ole in the database. i m using sql server authentication. if a user
logins say with login name Reader and he is a member of db_datareader
role i want get the role information of the user from he belongs. i m
using ado to connect to the database and getting the information from
the user from login screen. i dont want to use windows authentication.
can any body help me in determining the role of the user from which he
belongs.

thanx

Farid.

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Tue, 07 Jun 2005 19:49:12 GMT  
 Getting SQL Sever User Role Information
Ghulam ,

Check next functions in BOL for SQL Server.
IS_MEMBER
IS_SRVROLEMEMBER

you could get some information from SYSUSERS table

--
Val Mazur
Microsoft MVP


Quote:

> Hello
> in my vb project i want to enable disable menus depending on the user
> ole in the database. i m using sql server authentication. if a user
> logins say with login name Reader and he is a member of db_datareader
> role i want get the role information of the user from he belongs. i m
> using ado to connect to the database and getting the information from
> the user from login screen. i dont want to use windows authentication.
> can any body help me in determining the role of the user from which he
> belongs.

> thanx

> Farid.

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Tue, 07 Jun 2005 21:08:44 GMT  
 Getting SQL Sever User Role Information
I use the sp_HelpUser system stored procedure (SQL Server 7.0).

Bruce


Quote:

> Hello
> in my vb project i want to enable disable menus depending on the user
> ole in the database. i m using sql server authentication. if a user
> logins say with login name Reader and he is a member of db_datareader
> role i want get the role information of the user from he belongs. i m
> using ado to connect to the database and getting the information from
> the user from login screen. i dont want to use windows authentication.
> can any body help me in determining the role of the user from which he
> belongs.

> thanx

> Farid.

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Tue, 07 Jun 2005 23:58:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How can I get Role for Current User from SQL Server using VB6 ADO connection

2. Getting User Account Information

3. Getting user information from WordBasic?

4. Getting domain user information

5. Getting User Information from existing Mail Session in MAPI

6. Getting User Information from Active Directory via ASP/LDAP Provider

7. getting user information via WSH

8. Getting user information...

9. Getting Domain User Information

10. Q: FTP - Getting size of file from sever

11. HELP!!! User information of SQL server 6.5

12. How to convert an image field from SQL sever to a file

 

 
Powered by phpBB® Forum Software