|
Okay, I found the answer, and I will put it to the test tomorrow. For the benefit of the group, I will post it here. Apparently, if you pass NULLs for the user name and password parameters, to the SQLConnect() API, the user who is running the program is the user/password authentication that is used. >From IBMs API documentation: --> When running in server mode<http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/info/cli/rzadpsqlapd.htm#rzadpsqlapd>, both szUID and szAuthStr must be passed in order for the connection to run on behalf of a user ID other than the current user. If either parameter is NULL, or both are NULL, the connection will be started using the user ID that is in effect for the current job running the CLI program. <-- This is helpful, because if I have to force our users to re-key their password in, it would present much difficulty (they have a hard time getting their password right when signing on ;-) ) On 6/18/05, Tony Carolla <carolla@xxxxxxxxx> wrote: > > The SQL statements will always run on the local box, we aren't doing > anything with remote servers. I thought that since the db is on the > iSeries, and the program is running there too, there was some sort of > "inline" authorization method. I don't want the user to type in their > password (they will already be signed on), and I don't want to store > passwords. > > On 6/18/05, Carel Teijgeler <coteijgeler@xxxxxxxxx> wrote: > > Tony, > > > > I think the user with whom you want to establish the connection, must be > a > > valid user on the (remote) system. > > > > I would take a look at validation lists In those lists you might store > the > > user IDs and their password. > > I have not use them myself, yet, but I am working on a similar > "project". > > > > Just my thoughts on the problem. > > > > Regards, > > Carel Teijgeler > > > > *********** REPLY SEPARATOR *********** > > > > On 17-6-05 at 18:14 Tony Carolla wrote: > > > > >I have started using SQL CLI, and I have a question. When establishing > a > > >connection, user name and password are required. Now, I know how to get > the > > > > >current user name, but is there any way to 1) Get the current password > > >(doubt it), or 2) somehow establish a connection using the current user > > that is running the program? > > > > > > > > -- > > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing > list > > To post a message email: RPG400-L@xxxxxxxxxxxx > > To subscribe, unsubscribe, or change list options, > > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > > or email: RPG400-L-request@xxxxxxxxxxxx > > Before posting, please take a moment to review the archives > > at http://archive.midrange.com/rpg400-l. > > > > > > > -- > "Enter any 11-digit prime number to continue..." > "In Hebrew SQL, how do you use right() and left()?..." - Random Thought > "If all you have is a hammer, all your problems begin to look like nails" >
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.