Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving Windows Username

Status
Not open for further replies.

gavjb

Technical User
Jul 5, 2005
67
GB
Hi,

Is it possible to get the UserName of the current user logged onto Windows, as I need this to generate a value for a field in a stored procedure.

Thanks,


Gavin,
 
thanks, but that just returns the sql user, and I am after the user logged onto windows
 
As far as I'm aware the only way to do that is if you're using NT Authentication.
 
From what you are saying it looks like I will need to pass the username from the vb app to the stored procedure, I had hoped to get the amount of parameters down to a minimum oh well

SQLDenis - I am not connection to SQL via Windows Authentication, but what I am trying to do is pass the username to a Stored procedure which will be used in calculating a value.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top