User Authentication

G

Guest

Howdy all,

Does anyone know how to windows domain username for the
current connection? I've tried the CURRENT_USER function
but it only returns "dbo" no matter who's connected

Even better would be able to verify if the current user
was a member of a specific group from the active directory.

I want to limit access to certain forms based on group
membership.

I'm using access 2002 with MSDE on a Win2K domain. The
database is set to windows authentication only. I have
enterprise manager as well.

Thank you in advance!
 
G

Guest

Yes, that was it. I would have never guessed from the
documentation. How did you know?

Any ideas on how to check the username for group
membership?
 
D

Douglas J. Steele

I had to solve this problem myself years ago!

If you look up CURRENT_USER in BOL, there's a hyperlink System Functions at
the end of the section. Several of the functions listed there include USER
in their name, so it's a case of checking each one to see its description.

By Group Membership, are you talking Windows Security Groups or SQL Server
groups? I'm not sure you can get the Windows groups in SQL Server, and I'm
afraid I don't have access to SQL Server at the moment, so I can't answer
that one.
 
M

Malcolm Cook

from BOL:

Indicates whether the current user is a member of the specified Microsoft®
Windows NT® group or Microsoft SQL ServerT role.

Syntax
IS_MEMBER ( { 'group' | 'role' } )
 

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