How to get the full name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sc5502
    New Member
    • Jun 2014
    • 102

    #1

    How to get the full name

    Background:

    Back end - MS SQL 2008
    Front End - MS VS/VB 2017

    I want to get the user authenticated full name (ex:John Doe) a so it can be displayed on the screen and use it in processing. I would think you could get it from active directory. I have found a couple of routines but they do no work. Does anyone know how to get the full name? Thanks.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    You can use the WindowsIdentity .GetCurrent Method to get the current Windows User and then access the current Window User's name using the WindowsIdentity .Name property.

    Not sure how this relates to your MS SQL Server unless you have a user set up with it, that is using the same windows account as the user using the computer...
    Last edited by Frinavale; Apr 25 '17, 01:45 PM.

    Comment

    • sc5502
      New Member
      • Jun 2014
      • 102

      #3
      Thank you. I'll give it a try.

      Comment

      Working...