Re: help changing passwords forms 4.5
Date: 1996/04/30
Message-ID: <syarla.86.0008E53F_at_pt4064.pto.ford.com>#1/1
In article <3183B5D9.4BC0_at_sdc.com> dba_at_sdc.com writes:
>Path: eccdb1.pms.ford.com!fiesta.srl.ford.com!jobone!newsxfer.itd.umich.edu!ncar!imci4!newsfeed.internetmci.com!news1.erols.com!newsmaster_at_erols.com
>From: dba_at_sdc.com
>Newsgroups: comp.databases.oracle
>Subject: help changing passwords forms 4.5
>Date: Sun, 28 Apr 1996 11:15:53 -0700
>Organization: Erols Internet Services
>Lines: 7
>Message-ID: <3183B5D9.4BC0_at_sdc.com>
>NNTP-Posting-Host: as21s01.erols.com
>Mime-Version: 1.0
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>X-Mailer: Mozilla 2.0 (Win16; U)
>Hello,
>Our forms 4.5 application must allow a user to change his password.
>PL/SQL won't recognize the grant or alter commands. Does anyone have
>ideas as to how we can get around this?
>Thanks
create form with one control block. there items and two buttons.
user name __________ | change password | new password _________ | cancel |
confirm password _______
for when-button-pressed trigger for change password write
declare
cur integer;
rc integer;
str VARCHAR2(100);
username varchar2(30);
password varchar2(30) := :passwd; /* which is new password from control
block */
begin
if password = :con_passwd then
if rtrim ( upper ( password ), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_' ) is not null then message ( 'Invalid character(s) found in password' ); message(' '); elsif upper ( password ) = user then message ( 'Password may NOT be the same as your username' ); message(' '); else select user into username from dual; str := 'alter user ' ||username||' identified by '||password; forms_ddl(str); if not form_success then message('Failed to change Password '); else message('Password Successfully changed'); message(' '); end if;
end if;
else
message('Passwords not matched ');
end if;
exception
when others then
message('ERROR MESSAGE -> ' || SQLERRM); /* handle exception here */ end;
Bye
Suresh Yarlagadda
Ford Motors
313-337-9833
Received on Tue Apr 30 1996 - 00:00:00 CEST