Display MS SQL 2008 Login In (1 Viewer)

Petros

Registered User.
Local time
Today, 16:49
Joined
Jun 30, 2010
Messages
145
Hi,

How do i display the SQL login name in my Access 2007 front end.?
Is there a function i can use as the control source for a text box?

Thanks!
 

WayneRyan

AWF VIP
Local time
Today, 15:49
Joined
Nov 19, 2002
Messages
7,122
Petros,

There are like 4 of these constants, but I think the one you want is:

Select System_User ...

Wayne
 

Petros

Registered User.
Local time
Today, 16:49
Joined
Jun 30, 2010
Messages
145
Much appriciated Wayne,

when you say like 4 of these constants

youe mean functions such as

ENVIRON(Username) / foUSERname / etc ?

Thanks!
 

WayneRyan

AWF VIP
Local time
Today, 15:49
Joined
Nov 19, 2002
Messages
7,122
P,

No, are we talking about the SQL Server side.

I thought you wanted to know who the "Server" sees you as.

If you use Trusted_Connection, then the System_User returns something like:

Doman\FirstName.LastName

Whereas, UserName returns what they logged in as, which could be like some
DB defined user group like 'Engineers".

I don't have a Server available, but there really are 4 "perceptions" of who
the Server thinks you are.

Need more info,
Wayne
 

Users who are viewing this thread

Top Bottom