Discussion Locked

Change User Password from Oracle Form

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have created a change password form in Oracle Developer 2000 in order to fascilitate the user to change its password from this form instead of SQL/SQLPlus environment. But I am facing a problem in implementation of my this idea. The problem is that I am unable to issue the "Alter User" command from this form. For this purpose I have used "Forms_DDL" built-in. But Oracle Developer refused to execute this command. So it is requested that if someone know about it to change password from oracle form then he may kindly be guide me to solve my this dilemma.
I shall be highly obliged for this.
My email address is
hawk1@mul.paknet.com.pk

Thanks.

3 replies

by gary_w

I have a change password form too. It calls the stored procedure below once the user has entered and verified the new password. Note that the user must be logged in first.

We set up new users with a default password of 'guest'. When they loginfor the first time, if the password is 'guest' then the change password form is opened. The user changes their own password and we are out of the business of maintaining passwords. If they forget it, all we have to do is reset it back to 'guest'.It can also be called from a menu item too.

Good luck,
Gary

create or replace procedure change_pw(user IN VARCHAR2, password IN VARCHAR2) as

lv_exec_statement integer;

v_alter_user varchar2(100);

lv_rows_processed integer ;

begin

lv_exec_statement := DBMS_SQL.OPEN_CURSOR;

v_alter_user := 'alter user ' || user || ' identified by '||password;

DBMS_SQL.PARSE(lv_exec_statement,v_alter_user,DBMS_SQL.NATIVE);

lv_rows_processed := DBMS_SQL.EXECUTE(lv_exec_statement);

DBMS_SQL.CLOSE_CURSOR(lv_exec_statement);

end;

create public synonym change_pw for owner.change_pw;

grant execute on change_pw to public;

This discussion is closed to new replies.