Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / January 2006

Tip: Looking for answers? Try searching our database.

Retrievin SQL Group Info on logged in user

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan Fisher - 27 Jan 2006 18:10 GMT
I would like to retrieve the current users SQL group membership. What I want
is to be able to write code like:

If USERNAME is member of  POWERUSERS Then
     
            Do something
Else

            Do Something different

End If

Thanks for any help
Tom Ellison - 29 Jan 2006 00:39 GMT
Dear Alan:

Write the first line using a subquery:

If USERNAME IN (SELECT UserName FROM AllUsers
 WHERE IsPowerUser = 1)

You must fix all column names and the table name I assumed, and fix the
WHERE condition according to your design of what is a power-user.

Tom Ellison

>I would like to retrieve the current users SQL group membership. What I
>want
[quoted text clipped - 10 lines]
>
> Thanks for any help
Vadim Rapp - 29 Jan 2006 15:02 GMT
Hello,
You wrote on Fri, 27 Jan 2006 18:10:54 GMT:

AF> I would like to retrieve the current users SQL group membership.

check out the function IS_MEMBER.

Vadim Rapp
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.