database user password change [message #306741] |
Sun, 16 March 2008 08:45 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #307161 is a reply to message #306775] |
Tue, 18 March 2008 01:02 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
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).
|
|
|