Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2009
    Posts
    2

    Unanswered: Capture DB2 login name in MS Access?

    I have an Access front-end db linked to DB2 tables. One of the tables has a "USER" field and I need to insert the userID of the person who logs in to DB2 and adds a record to this table (via my Access form that adds records to that particular DB2 table). So when they open my Access db and open the form to enter data, I want this data to be inserted along with their DB2 user name (or user login ID). I do not want their Windows or network name, it must be the DB2 username.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Try using CURRENT_USER or SESSION_USER values.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Fill the field with the DB2 special register CURRENT USER.

    Andy

  4. #4
    Join Date
    Feb 2009
    Posts
    2

    CURRENT USER does not work

    Apparently CURRENT USER (or SESSION USER) does not apply to IBM mainframe DB2???

    If I update a field using CURRENT USER, or CURRENT_USER, or SESSION_USER, or (CURRENT USER), it gives an error

    UPDATE [tablename]
    SET [tablename].[fieldname] = CURRENT USER


    I get error:
    syntax error (missing operator) in query expression 'CURRENT USER'

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by willyboy
    Apparently CURRENT USER (or SESSION USER) does not apply to IBM mainframe DB2???
    Apparently, you should have mentioned your DB2 version and platform earlier.

    CURRENT CLIENT_USERID
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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