How to make OCI calls via DOA

Jim Ashton

Member²
I'm developing in Oracle8, Delphi5 & DOA.

I need to be able to issue an OCIPasswordChange call from my application to allow users to change their passwords.

Can I do this via DOA? - and if so, which component do I use?

Thanks
Jim
 
You can use TOracleSession.SetPassword to change the password.

You can use TOracleLogon.SetPassword for a complete dialog.

------------------
Marco Kalter
Allround Automations
 
OK thanks for that.

I assume that 'behind the scenes' these methods use the appropriate OCI call rather than 'alter user'? (which does not fully support password verification according to the Oracle 8i Administrator's Guide)

Cheers
Jim
 
A related question:

SetPassword relates to the current session only. Is there any way of allowing an 'authorised' user A to change another user B's password without requiring A first to logon as B (which obviously means A must know B's existing password) - and without using 'alter user'?

Thanks again
Jim
 
On SQL*Net, ALTER USER will be used, so you must be connected as the appropriate user.

On Net8, OCIPasswordChange will be used. You do not have to be connected, but you must create a TOracleSession, with LogonUsername, LogonPassword, and LogonDatabase set to the correct values (for user B), before you can call SetPassword.

See TOracleSession.SetPassword in the User's Guide or Help file for additional information.

------------------
Marco Kalter
Allround Automations
 
Back
Top