ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How to know current Login User

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to know current Login User

    Dear Support Manager,

    I am using iSeries i520 and connecting from VB.NET 2005

    Question Scenario:

    a) I used following connection string to open connection
    cn.ConnectionString = "Provider=IBMDA400;Data Source=I5
    MAIN;'Default Collection=MY_LIBRARY;
    cn.Open()

    b) I delibratly not use user id and password in connection string, because i want to open default client access login dialog

    Above both scenario working very pefectly

    Issues:
    a) After opening the connection how to I know from which user Id I loggin?

    b) If i use user id in connection string and then i changed the user id in login dialog box and if i check connection string it shows old user id
    i.e. cn.Properties.Item("user id").Value.ToString)

    c) is there any way to execute DSPWSUSR command using above connection to get user name?

    thanks and regards
    Last edited by msalman_ali; July 5, 2008, 01:05 AM.
Working...
X