Home » Developer & Programmer » Forms » database user password change
database user password change [message #306741] Sun, 16 March 2008 08:45 Go to next message
roni_a180
Messages: 45
Registered: October 2007
Member
hello

i create a database user abc

and now i change database user password in fornt end

that means
fornt end design

there r 3 text_item, username, oldpassword, newpassword

1st time given username, oldpassword,newpassword

then i press 'ok' button

1st check username and oldpassword is valid and then change user password

urgent pls help me


Re: database user password change [message #306775 is a reply to message #306741] Sun, 16 March 2008 13:42 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, you've already said everything that should be said. Obviously, you know WHAT to do. Where's the problem in coding it?

What have you done already? What happened during compilation? Execution? Any errors?

Also, be serious - it is Sunday today and not many people are ready to URGENTLY do anything for anyone (especially on a forum).
Re: database user password change [message #307161 is a reply to message #306775] Tue, 18 March 2008 01:02 Go to previous messageGo to next message
roni_a180
Messages: 45
Registered: October 2007
Member
hello

i write following code


DECLARE
username VARCHAR2(30);
upass varchar2(20);
sqlstr varchar2(250);
v_showalert number;
begin

username := rtrim(:CHANGEPASSWORD.USERNAME);
upass := rtrim(:CHANGEPASSWORD.CPASSWORD);

v_showalert := showalert(username,1);
v_showalert := showalert(upass,1);


if :CHANGEPASSWORD.UPASSWORD <> :CHANGEPASSWORD.CPASSWORD then
v_showalert:= showalert('Confirm password not match ',1);
raise form_trigger_failure;

end if;

sqlstr :='alter user ' ||username || ' identified by '||upass;

v_showalert := showalert(sqlstr,1);
--forms_ddl('alter user ' ||username || ' identified by '||upass );
forms_ddl(sqlstr);
---forms_ddl('commit');

IF FORM_SUCCESS THEN
v_showalert:= showalert('Password Changed ',1);

END IF;

IF FORM_FAILURE THEN
v_showalert:= showalert('Password not changed ',1);
raise form_trigger_failure;
END IF;


exception
when others then null;
--message(sqlcode||sqlerrm);
--message(sqlcode||sqlerrm);
end;


Re: database user password change [message #307228 is a reply to message #307161] Tue, 18 March 2008 03:32 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
i write following code

Fine. What about it? Are you satisfied with the result? Did you successfully change the password or not? If not, why not? Was there any message? I suppose not, because - even if there was an error - you successfully hide it with the unnecessary EXCEPTION handler (a suggestion: remove it completely and let a possible error normally propagate to the end user).
Previous Topic: problem in deploying forms
Next Topic: Menu Module
Goto Forum:
  


Current Time: Sun Feb 09 04:22:38 CST 2025