Results 1 to 2 of 2

Thread: Code Help: I would the network user name.

  1. #1
    Join Date
    Nov 2002
    Posts
    14

    Code Help: I would the network user name.

    Using Transact SQL how can I retrieve the network user name by accessing the API apiGetUserName.

    I would like to some how create a stored procedure that will retrieve the user name when a user tries to access the data in a table(s).

  2. #2
    Join Date
    Sep 2002
    Location
    DALLAS
    Posts
    25
    I'm not sure of the API... But you can try "SELECT loginame from master.dbo.sysprocesses (nolock) where spid = @@spid".

    HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •