Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture DB2 login name in MS Access?

Status
Not open for further replies.

fredboy

Programmer
Joined
Dec 28, 2004
Messages
1
Location
US
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 login to DB2, and then 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.
 
Make a pass-thru query with the SQL that retrieves the user name from DB2.

On Iseries it looks like this.
select user
from sysibm.sysdummy1

You could store it in a Public variable or run it each time your need it, but that seems like extra overhead to me.
 
shouldn't you be able to get it from the dialog box that opens when the user logs on? I know in Delphi I can set the login prompt to true for my database connection and when the user enters their name and password I can capture the user name there....is there no similar functionality in Access?

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top