D
Dan M
Access XP project file with SQL Server 2K back end. Using
NT authentication, so existing users can access the db
without a separate login.
Using T-SQL security functions, attempting to determine
current user. I've used Current_User, SUser_SName(),
System_User, User_ID(), User_Name() and they all return
either dbo or sa. All users have user objects and
matching logins.
I simply need to return their actual user name instead of
dbo and sa. Any ideas.
I'm trying to pull their user name in a stored procedure's
output parameter.
CREATE PROCEDURE sp_GetCurrentUser @theUser nvarchar(50) =
Null OUTPUT
AS
SELECT @theUser = User_Name() --(I've used all the above
mentioned functions here.)
SELECT @theUser
NT authentication, so existing users can access the db
without a separate login.
Using T-SQL security functions, attempting to determine
current user. I've used Current_User, SUser_SName(),
System_User, User_ID(), User_Name() and they all return
either dbo or sa. All users have user objects and
matching logins.
I simply need to return their actual user name instead of
dbo and sa. Any ideas.
I'm trying to pull their user name in a stored procedure's
output parameter.
CREATE PROCEDURE sp_GetCurrentUser @theUser nvarchar(50) =
Null OUTPUT
AS
SELECT @theUser = User_Name() --(I've used all the above
mentioned functions here.)
SELECT @theUser