|
Before doing something like that I would try to have the user's library list control the databases they access. PC2 -----Original Message----- From: Xu, Weining [mailto:Weining.Xu@AIG.com] Sent: September 19, 2001 13:06 To: 'JAVA400-L@midrange.com' Subject: How to get the current user ID after sign on to AS400 Hi, all, I have a program using JDBC driver to access DB2 on AS400. I will let the different users to use different testing databases(libraries) on AS400. So after the program connected to AS400, I need to know the user ID who just signed on AS400 in order to set up a URL as "jdbc:as400://mysystem/databaseXYZ". Then use this URL to make a connection, such as: con = DriverManager.getConnection(URL); Is there anyway I could get the current userID, something like: if (userID.equals("John")){ URL = "jdbc:as400://mysystem/databaseJohn"; } else if (userID.equals("Tom")){ URL = "jdbc:as400://mysystem/databaseTom"; } con = DriverManager.getConnection(URL); Thanks for any helps. Wayne
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.